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: Year 2000 Compliance

Re: Year 2000 Compliance

From: Michael Rothwell <michael_rothwell_at_non-hp-usa-om46.om.hp.com>
Date: Mon, 22 Jun 1998 17:14:40 -0700
Message-ID: <358EF370.60B2851A@non-hp-usa-om46.om.hp.com>


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')



01-jan-2005 1 row selected.

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

Original text of this message

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