Re: Forms 4.5: Y2K Date Format to use

From: Arjan van Bentem <avbentem_at_DONT-YOU-DARE-cable.a2000.nl>
Date: 1998/07/17
Message-ID: <6oo0hc$d4a$1_at_newton.a2000.nl>#1/1


>Its practically a 'religious' issue these days, but my thought is to
>use the full YYYY format for the year portion of Date fields to avoid
>problems with the century - this will work for any date 1699,1899,2199
>etc....Set it for the Database in the NLS_DATE_FORMAT entry in the
>init(sid).ora file - also make sure that the clients have the same (
>or no ) formats set....

I disagree. When setting up the default format as DD-MON-RRRR (needs Oracle 7.3 or above) then 1699 will still be 1699, but 99 will be interpreteted as 1999. When using YYYY in the default format, entering 99 is still perfectly legal, but will be stored as 0099. Likewise, the value 00 will raise an exception, as the year 0000 is not known. Evenmore, using RRRR will take care of wrong implicit conversions (which is not a Y2k problem), like in

    select to_char( to_date( '01-JAN-1999', 'DD-MON-YYYY'), 'DD-MON-YYYY')     from dual;

Of course, forcing the user to enter the full year is a good idea, but I am sure that some user will find that very one form you forgot to update... I'd use RRRR jsut to be sure.

Arjan. Received on Fri Jul 17 1998 - 00:00:00 CEST

Original text of this message