Re: Y2K Date Issues with Oracle 7.3.4

From: fumi <fumi_at_tpts5.seed.net.tw>
Date: 16 Jan 2000 14:32:16 GMT
Message-ID: <85skpg$bvo$2_at_news.seed.net.tw>


Sofia <sofia_at_eexi.gr> wrote in message news:85qgh1$2nf2$1_at_ulysses.noc.ntua.gr...
> interesting fact:
>
> If you cast "to_date" a date variable (don't ask me why you would
> like to do that), then no matter how much care you took in placing
> the correct date in the variable, the result will be a date after 2000.
>
> For example
>
> a_date DATE;
>
> a_date := to_date('12/10/1998','DD/MM/YYYY');
> a_date := to_date(a_date);
>
> now a_date has a 12/10/2098 value!

No.
It because that the datatype of the 1st parameter of TO_DATE() function is CHAR/VARCHAR2!
If you put a DATE in the 1st parameter, Oracle will implicitly convert to a string using TO_CHAR() function. Received on Sun Jan 16 2000 - 15:32:16 CET

Original text of this message