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: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1998/07/17
Message-ID: <6ontn9$ri91@hendrix.csufresno.edu>#1/1

In my opinion, you should not force your users to enter the four digit century in a date. In all but very few cases, you can always determine which century should be associated with a two digit year. It is a real pain to continually enter the extra keystrokes for the century when the computer "ought to know what you mean."

In nearly all the forms in our system, we are omitting the century from the date, so the user just enters six digits: MMDDYY. Wherever there is enough space for display-only dates, we display the century (and slashes): MM/DD/YYYY

On input dates, we use a simple function that infers the century from the two-digit year. It is a "sliding century" algorithm that sets the century so that the two digit year falls between a point 10 years ahead of the current year and 89 years behind. This system will work forever because it is tied to the current date.

For example, if our user enter 071708, the form translates it to 07/17/2008, while 071709 would translate to 07/17/1909. We call the function in every When-Validate-Item trigger for each date.

If anyone wants a copy of the code, just ask.

Regards,
Steve Cosner
http://members.aol.com/stevec5088

In article <35af235c.5446561_at_news2.mm.com>, TurkBear <johng_at_nospam.mm.com> wrote:
>skondolf_at_frontiernet.net (Steven C. Kondolf) wrote:
>
>>As a fairly new forms 4.5 developer and with all the discussions going on
>>relative to the y2k changover, what date format is proper to use for
>>current forms to insure accurate data entry as well as correct century
>>display both now and after 12/31/1999?
>>
>>I've noticed the "RRRR" format. Is this the suggested format to use for
>>the year portion? Are most people writing forms that force you to enter
>>the entire 4-digit year or is there a way to accurately default the proper
>>century if only a 2-digit year is entered?
>>
>>We're currently on the 16 bit version of forms 4.5 but will be upgrading to
>>32-bit version 1.6.1 in the near future. Are there any differences between
>>the 2 that I need to be aware of?
>>
>
>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....
>In your forms FORCE the users to enter 4 digits by using the FX prefix
>to the format mask e.g. FXMM/DD/YYYY will only accept input of the
>form 12/21/2011 - it will reject any variance ( including the / s )
>....In my humble ( like I'm humble ) opinion, this is the way I would
>go to prevent future Y2K type problems....
>
>John Greco
>Oracle DBA/Application Developer
Received on Fri Jul 17 1998 - 00:00:00 CDT

Original text of this message

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