Re: Oracle and Year 2000

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sun, 14 Jun 1998 13:33:16 GMT
Message-ID: <3584cf7c.9804197_at_192.86.155.100>


A copy of this was sent to Michael <michael1_at_xs4all.nl> (if that email address didn't require changing) On Sun, 14 Jun 1998 10:58:33 +0200, you wrote:

>I need to make some forms millenium-proof.
>Some say that using dateformat DD-MM-RRRR in stead of DD-MM-YYYY does
>the job, others say it is just a media hype. Who should I believe?
>I use Forms4.5 (if this is of any importance).
>
>Thanks to anyone who can help me out on this
>
>Michael

Media hype, no...

A millenium-proof solution, no...

A tool you can use to help you build an application that is year 2000 compliant, yes... (when used in combination with a design and thought)

DD-MM-RRRR just changes the way input dates will be interpreted when converted from a character string to a date field. The date '01-01-00', in a system where the date format is dd-mm-yyyy would be January 1, 1900. With RRRR is would be the year 2000, not 1900. For example:

SQL> alter session set nls_date_format='dd-mm-yyyy'; Session altered.

SQL> select to_date( '01-01-00' ) from dual; TO_DATE('0



01-01-1900

SQL> alter session set nls_date_format='dd-mm-rrrr'; Session altered.

SQL> select to_date( '01-01-00' ) from dual; TO_DATE('0



01-01-2000

Ok, so which is millenium proof? Neither. Which is more correct? It depends. Lets say your application was collecting the vintage on wine -- then perhaps YYYY would be more correct (since its more likely you have wine bottled in 1900 then 2000). On the other hand, if your application is a reservation system, 1900 is probably wrong and 2000 more correct.

DD-MM-RRRR, by itself, without thought and design, does nothing for you but change the problem description.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Sun Jun 14 1998 - 15:33:16 CEST

Original text of this message