On 10 Oct 2006 17:54:24 -0700, "no_spam_for_gman" <ga****@gmail.com>
wrote:
>
I did managed to easily create the function to go back and forth. I
will provide it in case someone is looking for the logic.....
DATE to JDE Date (using DB2's current_date):
----------------------------------------------------------
DECIMAL((YEAR(current_date)-1900)*1000+DAYOFYEAR(current_date),6)
JDE Date to DATE:
------------------------
DATE(DIGITS(DECIMAL(JDE_DATE_FIELD + 1900000,7,0)))
Populate the F00365 with as many years as you need then join the
julian date field (ONDTEJ) and use the date field (ONDATE) which is
formatted or the individual fields MM, DD, YY, CC.
I have used several different attempts at converting the date (as seen
above by others) but they all seem to fall down somewhere, i.e.
outside the IBM window (1940 through 2039).
Doug Belcher