Re: Year 2000 problem

From: Stevec5088 <stevec5088_at_aol.com>
Date: 1996/04/23
Message-ID: <4ljfb4$lv2_at_newsbf02.news.aol.com>#1/1


What you are asking for is already available in the RR and RRRR format. Using them will ensure a 2-digit year entered by the user will always be converted to a year between 1950 and 2049. Note that if you use YYYY, the user canNOT enter 00 for 2000 or anything else--Oracle rejects the entry with an error message.

We have done even better, though. Using a function in Forms, we convert each 2-digit year to 4 digits, allowing the span to be 89 years before the present year and 10 years after. This function "slides along" with the current date so it will never need modification. (If anyone wants to see the code, I can send it. Please use my stevec_at_csufresno.edu address, not this one)

Steve Cosner

>Hello,
> I had a thought - what if the format "yyyy" behaved in a "good" way?
 For
> instance: If I set up an input format of "dd-mon-yyyy" and the user
> accidently forgot to say 1996 - instead he just said 96, wouldn't it
 be
> nice of Oracle to use 19 as the century?
>
> As it is, they change 96 to 0096 and they do not consider it an error!
>
> I can see a lot of bad dates being entered because of this.
>
> On the other hand, if Oracle would recognize that only two digits were
> given, they could default the first 2. Likewise, if the format "rrrr"
> existed, they could do the appropriate thing. This would allow users
 to
> enter 2 digit years, or if needed, to enter the 4 digit year.
>
> As it is now, either they must enter a 4 digit year (and not be told
 that
> they goofed if they forgot) or enter a 2 digit year and hope for the
 best.
>
> Whatever the situation, you must allow the user to see the date in
 "yyyy"
> format before he commits.
Received on Tue Apr 23 1996 - 00:00:00 CEST

Original text of this message