See below
From: William M Klein [mailto:wmkl...@ix.netcom.com] Sent: Friday, August 13, 2010 10:25 PM To: William M. Klein Subject: Date formats On 08/13/2010 12:43 PM, zMan wrote: > On Fri, Aug 13, 2010 at 12:32 PM, McKown, John > <john.mck...@healthmarkets.com> wrote: >> There are two that I know of which you did not mention. Lilian and COBOL. COBOL is an integer which is the number of days since 31Dec1600. Lilian is an integer which is the number of days since 14Oct1582. > Wow, in 35 years I've never heard of either! But then, I'm not a > COBOL maven. Thanks. <snip> >The COBOL relative day support didn't become available until long after >we had already laid the ground work for Y2K remediation, and while it >provided a building block that can be a basis for a generalized date >conversion solution and date calculation, it was only a tool, not a >complete solution. I believe LE runtime library now provides very >flexible date conversion, but date/time adjustments, like returning 2nd >Sunday of the month containing this date, YYYYMMDD + 5 days -> YYYYMMDD, >or current date/time + 8 hours still require roll-your-own effort, while >our routine handles this kind of thing with a single call. <snip> The COBOL date (Integer-of-Day/Date) is based on the ANSI and ISO Standards and using Jan 1, 1600 as day "1" in order to allow for division by 7 or the MOD function to correctly get the "day of week" in accordance with the OLD Accept xyz from Day-of-Week syntax. This feature was adopted as part of the ANSI/ISO Standard in 1989 (well before Y2K remediation - but it was hoped that it would help with that). When LE came out with its own (cross-language) integer value for dates, they used the (most of Europe adopted the Gregorian calendar) date of 14 October, 1582. There is an LE callable service to "convert" from ANSI/ISO Standard COBOL dates to LE dates, i.e. CEECBLDY. See: <http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea31a0/2.2.5.2 3> http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea31a0/2.2.5.23 There is also a COBOL compiler option to use the non-Standard "Lillian" dates, i.e. INTDATE, see: http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/IGY3PG50/2.4.26 All of this is in addition to the various "formatting" options that LE provides for "output dates". See: <http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea31a0/APPENDI X1.2> http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceea31a0/APPENDIX 1.2 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html