Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Century date mask & Y2K compliance

Re: Century date mask & Y2K compliance

From: <rpurdam8122_at_my-deja.com>
Date: Tue, 21 Sep 1999 14:27:18 GMT
Message-ID: <7s84jm$d2i$1@nnrp1.deja.com>


Actually 2000 is still in the 20th century, despite all the fuss about the 'New millenium'. Therefore it is correct for 2000 to be reported as the 20th century, and incorrect to report it as the 21st century. What's more, this a known bug (bug reports 400983, 648071, 873587, 886235, 884893, 884896).

In article <I5aF3.16$dB1.2011_at_nntp.csufresno.edu>,   stevec_at_zimmer.csufresno.edu (Steve Cosner) wrote:
> In article <7rtgna$83e$1_at_nnrp1.deja.com>,
> Neil Emery <neil.emery_at_virgin.net> wrote:
> >All,
> > We have a date checking algorithm which uses the century format
which
> > is giving inconsistent results depending on the system date
> >
> > This Unix box has system date set to today's date
> >
> > SQL> select to_char(to_date('01-jan-2000', 'dd-mon-yyyy'), 'cc')
from
> >dual;
> >
> > TO
> > --
> > 21
>
> It does not matter what the system date is. The century on
> 01-Jan-2000 is 21. We are in the last year of the 20th century, next
> year is the 21st!
>
> Try this in SQL Plus:
>
> column today format a12
> column century format a10
> column "YEAR CEN." format a10
> select to_char(sysdate,'dd-Mon-yyyy') today,
> to_char(sysdate,'cc') century,
> to_char(to_date('01012000','MMDDYYYY'),'yyyy cc') "YEAR CEN."
> from dual;
>
> Here's what I get:
>
> TODAY CENTURY YEAR CEN.
> ------------ ---------- ----------
> 19-Sep-1999 20 2000 21
>
> Steve Cosner
>
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Sep 21 1999 - 09:27:18 CDT

Original text of this message

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