Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Date format

Re: Date format

From: Mark D Powell <markp7832_at_my-deja.com>
Date: Fri, 06 Oct 2000 14:29:03 GMT
Message-ID: <8rknj4$9i2$1@nnrp1.deja.com>

In article <8ri6p1$41a$2_at_wanadoo.fr>,
  "auxitec e2ia" <auxitec.e2ia_at_wanadoo.fr> wrote:
> I got a problem with oracle 7.2 and NLS_DATE_FORMAT. In the table my
 dates
> is like : 01-JAN-99 but if i use this SQL command :
>
> select to_char(dates,'DD-MM-YYYY') from test;
>
> result is : 01-JAN-2099 but I want : 01-JAN-1999 and I can't give
 the
> year with 4 digits with AutoLisp/AutoCAD.
>
> If I put this environment variable in Windows NT4 :
> NLS_DATE_FORMAT = DD-MON-RR
> it will working very well,
>
> but i'd like to set this variable in INITCLT.ORA and if I try this :
> NLS_DATE_FORMAT = 'DD-MON-RR'
> Nothing append.
>
> Perhaps the syntax is not good.
>
> Thanks for any help,
> --

The fact that the query returned 2099 as the date means the data was stored in the database with the year of 2099. You need to fix the bad date values then the RR will work the way you want with a two digit year of '99' being read as 1999 instead of 2099. The RR date mask will not change the stored data; it will only affect future inserts.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Oct 06 2000 - 09:29:03 CDT

Original text of this message

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