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: Date Format Mask Question (Y2000)

Re: Date Format Mask Question (Y2000)

From: lge <elkinsl_at_flash.net>
Date: 1998/02/19
Message-ID: <34eb8fe3.330497519@news.flash.net>#1/1

To add to what Ian said, even if one defines all the format masks to include YYYY, one still has to look *very* carefully at how dates are used in a form. This applies to 3.0, 4.5, and 5.0. One example follows:

  1. Create an date item with a format mask of mm/dd/yyyy.
  2. Enter the value 12/31/2001.
  3. For testing, in a trigger tied to a button perhaps, execute the following code:
	:Global.Temp := :Emp.Hiredate;
	:Emp.Hiredate := :Global.Temp;

4) What does the date say now? 12/31/1901!

There are ways to address this; but, removing century ambiguity by using a mask of YYYY (or RRRR as we use in 4.5 and 5.0) is not a magic bullet. One still has to carefully review the code and see how dates are used and manipulated. Then, one has to test, test, test. Other proposed solutions by Oracle and others still have their gotcha's that one has to watch out for. The global scenario above is but one example.

Regards,

Larry G. Elkins
elkinsl_at_flah.net

ijones_at_slip.net (Ian Jones) wrote:

>the DD-MON-RR format mask does not work in forms 3.0
>
>Options:-
>
> Upgrade to forms45 character mode
>
> Include reformating code (see Oracle whitepaper)
>
> Expand to YYYY format.
>
>Don't know of any 'zero work' approaches. Some interesting
>post about database triggers recently, but I haven't looked at
>it in detail.
>
Received on Thu Feb 19 1998 - 00:00:00 CST

Original text of this message

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