Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Y2k Problem with 7.3.4
Glenn Baron wrote
>What is the NLS_DATE_FORMAT as defined (or not) in your init.ora ?
>
>If 'dd-mon-yy' , or not explicitly set, then '01-Jan-00' (without the
>explicit RR mask)
>means '01-Jan-1900', and the Sql is correct
True, if one of to use to_char(end_date). But I really think it should *not* affect the order by in a select query, should it? If it would, then why does Oracle not sort dates fully alphabetically, like '01-Dec-99' < '01-Jan-99' due to the D in Dec and the J in Jan?
Or what if one was to use:
select start_date
from ...
order by end_date;
The selected START_date has nothing to do with the END_date which is used in the order by. END-date is not printed anywhere, so why would Oracle use NLS_DATE_FORMAT on END_date? I would simply expect Oracle to sort date columns Y2k compliant! And I still believe it does.
Anyone who can execte the following for me?
select to_date('01-JAN-1999', 'dd-mon-yyyy')
from dual
union
select to_date('01-JAN-2000', 'dd-mon-yyyy')
from dual
union
select to_date('01-JAN-1998', 'dd-mon-yyyy')
from dual
order by 1;
Arjan. Received on Tue Mar 02 1999 - 12:52:49 CST
![]() |
![]() |