Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Wrong century in SQL statements
If you don't use a full year mask (yyyy) the century is taken from the
sysdate
You need to set nls_date_format = 'dd-mm-rr', anything above 50 will be 20th
century, anything below 21st.
As you don't provide much detail about your environment and platform, I
can't tell you whether you need to
a) set an environment variable b) a registry value c) use an alter session command.
Hth,
Sybrand Bakker, Oracle DBA
GH <gh_at_yahoo.com> schreef in berichtnieuws
RJAW4.4751$g2.59855_at_news.corecomm.net...
> Hi All,
> I've inherited a database with over a thousand SQL procedures and
we've
> recently run into a little problem with a few statements due to the date
> format. The dates in the SQL statements are formatted as dd-mmm-yy. I
think
> some of the years are being read as 20yy. Does Oracle have a sliding date
> window? I would like to be able to set something to tell it that any year
> over 80 should be in the 1900s, and not the 2000s. And I really don't want
> to change a whole bunch of SQL statements. Thanks in advance for any help.
>
>
>
Received on Tue May 23 2000 - 00:00:00 CDT