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: Wrong century in SQL statements

Re: Wrong century in SQL statements

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/05/23
Message-ID: <959115541.1580.0.pluto.d4ee154e@news.demon.nl>#1/1

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

Original text of this message

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