Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 7.3 and Year 2000
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
--
![]() |
![]() |