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: Which default date format for Y2K

Re: Which default date format for Y2K

From: Diego <dpafumi_at_yahoo.com>
Date: Wed, 27 Jan 1999 08:32:44 -0800
Message-ID: <36AF3FAB.85C64B79@yahoo.com>


The best format is 'RRRR'. With that you can put data from 19xx and 20xx.

esiyuri_at_my-dejanews.com wrote:

> In article <369A2FE9.408B6D82_at_ix.netcom.com>,
> Jerry Metz <JMetz1_at_ix.netcom.com> wrote:
> > > You might be better served by changing all dates within any Oracle program
> > > or other front end that "talks" directly to Oracle to the format:
> > > DD-MON-CCCC The CCCC maintains the century so that you don't have to do
> > > conversion work where you don't want to.
>
> Jerry,
>
> sorry, but I think that you are mistaken. The 'CC' format model gives the
> century, ie: in 1999 CC=20, in 2000 CC=21 as shown below...
>
> SQL> select to_char(to_date('01-JAN-1999','DD-MON-YYYY'),'CC') from dual;
> 20
>
> SQL> select to_char(to_date('01-JAN-2000','DD-MON-YYYY'),'CC') from dual;
> 21
>
> The format that you suggested, 'CCCC' does not exist. It is just a
> doubling-up of the 'CC' format and would therefore give '2020' and '2121'
> respectively. I doubt that is what you want!
>
> IMHO, 'RRRR' is the one to used for Y2K compliance. For new systems 'YYYY' is
> probably better, but it will 'break' any existing code that expects a 'YY'
> format.
>
> Regards
> Yuri McPhedran
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Wed Jan 27 1999 - 10:32:44 CST

Original text of this message

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