Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Forms 4.5: Y2K Date Format to use

Re: Forms 4.5: Y2K Date Format to use

From: TurkBear <johng_at_mm.com>
Date: Fri, 17 Jul 1998 20:35:55 GMT
Message-ID: <35afb4c4.9277099@news2.mm.com>


"Arjan van Bentem" <avbentem_at_DONT-YOU-DARE-cable.a2000.nl> wrote:

>>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.
>
>
>
>

However 'RRRR' uses a sliding window to determine the century, based on the year entered and the current date....this could cause problems when dealing in multiple centuries....if you allow 2 digit input, that is....( see point 2) Received on Fri Jul 17 1998 - 15:35:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US