[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Year 2000



Vicki,
    Although human beings may consider the way Oracle handles YY to be in
error, Oracle thinks of it as a feature.
    The YY format means current century prepended to the year.
    There is an alternative RR format, which has a complicated
definition.Read about it in
        * Oracle SQL Reference Manual, Chapter 3, date format elements
        * Oracle magazine, Jan/Feb 1999
        * chapter 8 of "High Performance Oracle8 Tuning" by Don Burleson
RR uses a 2x2 decision matrix, comparing how current year (as YY)  and the
2-digit year specified by RR relate in terms of 00-49 (low)  or 50-99
(high). The 4 possibilities are:
        1.  current low, RR low -> this century
        2.  current low, RR high -> previous century
        3.  current high, RR low -> next century
        4.  current high, RR high -> this century
    RR is not a panacea.  You still need YYYY to specifiy dates outside
these assumptions.

- Wade Wells

Deepak Shirguppi wrote:

> Vicki,
> I tried doing this directly on the Oracle database.
> I created a dummy table with name xyz and one column "trial", datatype
> as date.
> If you do a insert as follows :
> insert into xyz values('29-FEB-00');
> I got an error. Basically Oracle thinks it to be 1900 and not 2000.
>
> So,
> insert into xyz values (to_date('02-29-2000','mm-dd-yyyy'));
> worked and on doing a select I got the following result.
>
> SQL> select to_char(trial,'mm-dd-yyyy') from xyz;
>
> TO_CHAR(TRIAL,'MM-DD-YYYY')
> ---------------------------------------------------------------------
> 02-29-2000
>
> HTH,
>
> -- Deepak.
>
> >From: Victoria Lo <VGL123@AOL.COM>
> >Reply-To: SQR-USERS@list.iex.net
> >To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
> >Subject: Year 2000
> >Date: Thu, 18 Mar 1999 12:39:02 EST
> >
> >Hello everyone;
> >
> >Has anyone had problem to insert date of "29-FEB-00" into PeopleSoft
> tables
> >on Oracle platform? Is there any resolution? Please let me know. Thank
> you.
> >
> >Vicki
> >
> >
>
> Get Your Private, Free Email at http://www.hotmail.com