NLS_DATE_FORMAT revisited

From: Steve Elliott <selliott_at_crl.com>
Date: 1996/10/06
Message-ID: <539g14$dmb_at_crl.crl.com>#1/1


Hello,

I am developing an application on Oracle 7.1 and have run into this problem. If I specify NLS_DATE_FORMAT as 'DD-MON-RR', it works as expected when I say something line 'select * from table A where ... predicates... order by A.DATE_FIELD'. That is, the turn of the century is handled properly and rows are ordered by date with those in the 20th century first and those in the 21st centure later. However, if I say 'select * from table A where A.DATE_FIELD > '01-JAN-00' ', it selects all records, even those in the 20th century as if I had said '01-JAN-1900'.

Tell me, is NLS_DATE_FORMAT only used for output? If so, what is the easiest way to specify century in a date comparison predicate of a select statement? I would like to avoid the TO_DATE function as this type of predicate occurs in many places.

Any help would be appreciated.

Steve Elliott

-- 

    Steve Elliott (selliott_at_crl.com)
Received on Sun Oct 06 1996 - 00:00:00 CEST

Original text of this message