Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need syntax for Date, where Date is in format 'YYYY-mm-dd'

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Mon Aug 25, 2008 12:04 am    Post subject: Need syntax for Date, where Date is in format 'YYYY-mm-dd'
Reply with quote

I need syntax for Date, where Date is in format 'YYYY-mm-dd'

and i just know that the year would be starting from 19..

I want to find out the records where date has year as 19...

Thanks.
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Aug 25, 2008 12:39 am    Post subject:
Reply with quote

Select * from table where the_date >= '1900-01-01';
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Aug 25, 2008 2:46 am    Post subject:
Reply with quote

Hello,

Quote:
I want to find out the records where date has year as 19...

Also if only the 19s are to be selected:
Select * from table where the_date >= '1900-01-01' and the_date < '2000-01-01';
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 25, 2008 12:46 pm    Post subject:
Reply with quote

?? what is the datatype for the column containing the date?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Aug 25, 2008 8:04 pm    Post subject: Reply to: Need syntax for Date, where Date is in format 'YYY
Reply with quote

Hopefully, char(10). . . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us