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: <esiyuri_at_my-dejanews.com>
Date: Wed, 13 Jan 1999 11:28:28 GMT
Message-ID: <77i00o$es3$1@nnrp1.dejanews.com>


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 13 1999 - 05:28:28 CST

Original text of this message

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