Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Year 2000 Compliance
replace the 'yy' in the to_date function with 'rr' and you
will get the expected results.
select to_char( to_date( '1-jan-05','dd-mon-rr' ), 'dd-mon-yyyy' ) from dual;
TO_CHAR(TO_DATE('1-JAN-05','DD-MON-RR'),'DD-MON-YYYY')
Michael.
Steve Livingston wrote:
>
> (I was absent from school for several days)
>
> I though Oracle used 19xx for years >47 ('83'=>1983)
> and used 20xx for years <47 ('05'=>2005)
>
> But:
> select to_char( to_date( '1-jan-05','dd-mon-yy' ), 'dd-mon-yyyy' ) from
> dual;
>
> TO_CHAR(TO_DATE('1-JAN-05','DD-MON-YY'),'DD-MON-YYYY')
> ---------------------------------------------------------------------------
>
> 01-jan-1905
>
> Help anyone?
>
> Cheers,
> Steve
Received on Mon Jun 22 1998 - 19:14:40 CDT