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: Oracle 7.3 and Year 2000

Re: Oracle 7.3 and Year 2000

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: Fri, 08 Jan 1999 17:34:54 +0800
Message-ID: <3695D13E.6125@bhp.com.au>


Merlin Team wrote:
>
> Hi,
>
> I have encountered a problem whilst attempting to enter dates in the format
> dd-mon-yy into my database.
>
> The database server was configured using the default settings i.e American
> language set. When I query nls_parameters the date format is shown as
> dd-mon-yy.
>
> Using sql*loader I insert the data into a date field and it appears to
> display fine. If I use the alter session command to set the nls_date_format
> to dd-mon-yyyy any dates that have the year set as 00 or greater display as
> 1900, 1901 etc.
>
> Can anybody suggest what I need to do to get the data accepted as 2000, 2001
> etc. Ideal the solution should be set in the initialisation file.
>
> Thanks
>
> Paul
> paul_merlin_at_hotmail.com

Look at the RR or RRRR format mask...

In essence, year < 50 means next century, year > 50 means this century...

insert into xxx
values ( to_date('01-jan-34','dd-mon-rr'));

select to_char(col,'dd-mon-yyyy') from xxx;   

    01-jan-2034

Cheers

--



Connor McDonald
BHP Information Technology
Perth, Western Australia
"The difference between me and a madman is that I am not mad" Received on Fri Jan 08 1999 - 03:34:54 CST

Original text of this message

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