The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
compare files in the system with last modified date bsandeep_80 Linux 6 01-14-2008 09:56 PM
How can i get the yesterday's date in YYYYMMDD format prasadsr HP-UX 4 01-19-2007 06:52 AM
get yesterday's date? fedora Shell Programming and Scripting 1 12-08-2006 12:28 PM
Yesterday's date function ssmiths001 UNIX for Dummies Questions & Answers 4 01-11-2005 07:06 AM
Yesterday's date ssmiths001 UNIX for Dummies Questions & Answers 2 11-22-2004 06:46 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 04-23-2008
Moderator
 

Join Date: Feb 2007
Posts: 2,314
As earlier mentioned, I'm not familiar with this stuff, I hope a db2 expert comes along with the right answer but in the meantime you may look at this link:

DB2 Basics: Fun with Dates and Times

Regards
Reply With Quote
Forum Sponsor
  #9  
Old 04-24-2008
Registered User
 

Join Date: Mar 2008
Location: MUMBAI, INDIA
Posts: 34
Try this one..

DATE_STAMP=`TZ=CST+24 date +%Y-%m-%d`
count=`db2 -x "select count(*) from schema.tablename where PROCESS_DT= TO_DATE($DATE_STAMP,'YYYY-MM-DD')`

The above date comparision is working in Oracle.
Reply With Quote
  #10  
Old 1 Day Ago
Registered User
 

Join Date: Dec 2007
Posts: 260
try using this format. This is the DB2 timestamp format.

YYYY-mm-dd-HH.MM.SS.ssssss

+%Y-%m-%d-00.00.00.000000
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:19 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0