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: Y2K QUESTION automatic conversion

Re: Y2K QUESTION automatic conversion

From: Tommy Wareing <p0070621_at_brookes.ac.uk>
Date: Wed, 06 May 1998 15:39:18 GMT
Message-ID: <355083e7.104793865@news.brookes.ac.uk>


What Doug means is

If one converts a string to a date using the YY format mask, then the database defaults the century. As we know, this currently defaults to 19. But where does this come from? Is it built into the database somewhere, or is it taken from the current system date?

This will make a difference come the year 2000: '5-MAY-98' currently (today being the 6th May, 1998) means 05/05/1998. But what will it mean on the 1st January, 2000? Will it still mean 05/05/1998, or will it suddenly mean 05/05/2098?

Unfortunately, I don't know the answer

On 6 May 1998 11:46:19 GMT, "Barry Jones" <jonesb_at_logica.com> wrote:

|>No, the reason this works currently is your NLS_DATE format has set to 2
|>digit years.
|>You have the choice of either changing the NLS_DATE format or performing a
|>to_date with 4 digit year picture.

|

|>Doug Henderson <dough_at_dsp35001.ca.boeing.com> wrote in article
|><354FB25D.17E4_at_dsp35001.ca.boeing.com>...
|>> A Y2K-related question about automatic conversion of data types:
|>>
|>> I understand that Oracle automatically converts a CHAR string to DATE
|>> if the CHAR string is in the "default Oracle" (i.e., DD-MON-YY)
|>> format. So, an insert like the following will work in SQL*PLUS:
|>>
|>> INSERT INTO some_table (st_date) /* st_date is a DATE column */
|>> VALUES '05-MAY-98';
|>>
|>> The year for the date inserted by the above statement will end up
|>> as 1998 in the database.
|>>
|>> My question is, will such automatic conversion work correctly after
|>> 1/1/2000? In other words, will the century portion of the year for
|>> such an insert automatically be the 21st century after 1/1/2000?

--
Tommy Wareing
MIS Group
Learning Resources
Oxford Brookes University
01865 483389 Received on Wed May 06 1998 - 10:39:18 CDT

Original text of this message

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