Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Date sort???
This may sound silly but perfectly feasible.
Is the year actually stored in the database as 28-MAY-1999 or 28-MAY-0099?
If the dates were entered without the format mask not being DD-MON-YYYY but as DD-MON-YY, 0099 can at times be written to the database. The one with the year 1998 could have been entered corectly, hence appearing at the bottom of the list.
I say this because its happend at my last place!
Mark
Alex Peng wrote in message <7ktg8j$28ec$1_at_earth.superlink.net>...
>Hi,
>
>I use Oracle 8.0.4 in Windows NT.
>I have the following SQL :
>
>select publishtime from articles order by publishtime;
>
>Can anyone explain why year 98 comes after year 99?
>Thanks,
>
>Alex
>
>The result is : (some of records return null)
>
>28-MAY-99
>28-MAY-99
>28-MAY-99
>31-MAY-99
<snip>
>23-JUN-99
>01-FEB-98
>01-FEB-98
>01-FEB-98
>01-FEB-98
Received on Thu Jun 24 1999 - 10:18:09 CDT
![]() |
![]() |