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: Y2K question

Re: Y2K question

From: Dave Morse <dmorse_at_nospam.cinergy.com>
Date: Wed, 5 Aug 1998 11:41:38 -0500
Message-ID: <6qa20k$c54$1@news.iquest.net>


Actually, I disagree with your comment that the TO_DATE function converts the datatype VARCHAR2 to the datatype DATE using the specified format. My initial exposure to the TO_DATE function (many moons ago) led me to believe that the format parameter was the picture of how the date was being converted to. But, actually, the format parm tells the TO_DATE function how the VARCHAR2 variable is formatted, not how to format it. The function converts it to the default system date.

Cheers!

J.J.J.A. de Jager wrote in message <35C845AB.33861467_at_vertis.nl>...
>Dave,
>
>Yes there is a problem, because the function TO_DATE converts the datatype
>VARCHAR2 to the datatype DATE, using the specified format (mm/dd/yy). In
the
>TO_DATE conversion, Oracle uses by default the century at the time the
>conversion is being executed.
>
>Executed at VARCHAR2 -> TO_DATE -> DATE
>25-02-1998 01/01/99 -> -> 01/01/1999
>25-02-1998 01/01/25 -> -> 01/01/1925 (!)
>25-02-1998 01/01/00 -> -> 01/01/1900 (!)
>
>Executed at VARCHAR2 -> TO_DATE -> DATE
>25-02-2002 01/01/99 -> -> 01/01/2099 (!)
>25-02-2002 01/01/25 -> -> 01/01/2025
>25-02-2002 01/01/00 -> -> 01/01/2000
>
>The problems above can be fixed by using the RR format in DD/MM/RR but
>unfortunaly this is only possible in Forms 4.0/4.5.
>
Received on Wed Aug 05 1998 - 11:41:38 CDT

Original text of this message

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