View previous topic :: View next topic
|
Author |
Message |
Mukesh Pandey
Active User
Joined: 11 Nov 2008 Posts: 143 Location: India
|
|
|
|
Hi All,
I have a file in which the date is defined as follows:
date pic 9(5) comp-3.
The date is displayed in julian format as '9209' and so on. I want to view these packed julian date in db2 format using db2 query. And suggest me how to convert those dates to 01/01/2011. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Assuming the actual julian-date is 2009209, use FUNCTION INTEGER-OF-DAY to convert to Lilian Days then use FUNCTION DATE-OF-INTEGER to convert to its CCYYMMDD format.
Why 01/01/2011? I'm not understanding you or is this the desired template format?
Bill |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Mukesh,
You have a file and you need to convert the date format for a field. Why do you want to involve DB2 into this?
Dont you have any in-house DATE routines? |
|
Back to top |
|
|
Mukesh Pandey
Active User
Joined: 11 Nov 2008 Posts: 143 Location: India
|
|
|
|
i have achieved it using ezetrieve... |
|
Back to top |
|
|
|