In DB2, the julian date is 94167 defined as Decimal. I need to convert this into 06/16/94.
Tried DateFromJulianDay function but getting ***
Conversion of JulianDate YYDDD to mm/dd/yy date format
Moderators: chulett, rschirm, roy
That's not a Julian date but rather an Ordinal date, meaning the first two digits are the year and the next three are the day number for that year. From the manual:
"A Julian day specifies the date as the number of days from 4713 BCE January 1, 12:00 hours (noon) GMT"
In other words, just an integer. Sorry, not sure off the top of my head if there's a PX function to handle those kind of date fields or if you need to sub-string it and handle the pieces separately.
"A Julian day specifies the date as the number of days from 4713 BCE January 1, 12:00 hours (noon) GMT"
In other words, just an integer. Sorry, not sure off the top of my head if there's a PX function to handle those kind of date fields or if you need to sub-string it and handle the pieces separately.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Re: Conversion of JulianDate YYDDD to mm/dd/yy date format
hi,
i think you can change it to date by using date_from_string function and specify the Date format as yyddd. you have to convert decimal to string first which can be achieved by using DecimalToString(CollName,"suppress_zero").
i think you can change it to date by using date_from_string function and specify the Date format as yyddd. you have to convert decimal to string first which can be achieved by using DecimalToString(CollName,"suppress_zero").
Re: Conversion of JulianDate YYDDD to mm/dd/yy date format
hi,
i think you can change it to date by using date_from_string function and specify the Date format as yyddd. you have to convert decimal to string first which can be achieved by using DecimalToString(CollName,"suppress_zero").
It Looks Similar to this
StringToDate(DecimalToString(Link_AU.AU_ID,"suppress_zero"),"%yy%ddd")
i think you can change it to date by using date_from_string function and specify the Date format as yyddd. you have to convert decimal to string first which can be achieved by using DecimalToString(CollName,"suppress_zero").
It Looks Similar to this
StringToDate(DecimalToString(Link_AU.AU_ID,"suppress_zero"),"%yy%ddd")