Date format in DB2



IBM's flagship relational database management system

Date format in DB2

Postby waleeed1 » Tue Feb 23, 2016 1:18 pm

I have learnt that DB2 format date is dd/mm/yyyy but when it stores internally, it gets stored in ISO format which is YYYY-MM-DD. IS my understanding correct? What is the difference between DB2 format and ISO format of date when it comes to storing and retrieving from database? Which one do we use?
waleeed1
 
Posts: 2
Joined: Tue Feb 23, 2016 1:17 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Date format in DB2

Postby NicC » Tue Feb 23, 2016 4:14 pm

Welcome to the forum. Please read the forum rules - you have managed to break 2 of them (if not 3) in your first post! You have resurrected an old topic, you have hi-jacked someone elses topic and, possibly, you have not looked in the manuals/internet.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Date format in DB2

Postby waleeed1 » Tue Mar 01, 2016 5:09 pm

I am a little confused with the date format in DB2 and need clarification.

1) While checking for a particular date in the WHERE clause in which format should i represent it? For eg. i want to check if begin date is GE 23/02/2009 then how do i code?

BEG_DT >= '23/02/2009' ---> Is this form of checking correct?

2) What is the internal format in which a date is stored in DB2 table?

3) I have learnt that DB2 format date is dd/mm/yyyy but when it stores internally, it gets stored in ISO format which is YYYY-MM-DD. IS my understanding correct? What is the difference between DB2 format and ISO format of date when it comes to storing and retrieving from database? Which one do we use?
waleeed1
 
Posts: 2
Joined: Tue Feb 23, 2016 1:17 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Date format in DB2

Postby enrico-sorichetti » Tue Mar 01, 2016 5:24 pm

Topic split
link to a games site removed
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post