Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6970
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 Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 5 Tue Oct 24, 2017 12:01 pm
No new posts Format issues using XMITIP MSGDD ssdjp1 CLIST & REXX 5 Mon Oct 23, 2017 8:47 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us