Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Date Sort Order Incorrect!
James <thanatic_at_telstra.com> wrote:
: I thought oracle ordered date columns by the full internal value of
: the date (including seconds)
It does.
: select action_code,to_char(action_date,'DD-MON-YYYY
: HH24:MM:SS'),action_date
^^
Probably that should be MI, not MM: I suppose you want minutes, not months.
: from plog where vehicle_id=151855 order by action_date;
: 1 05-AUG-2004 16:08:37 05-AUG-04
: 1 05-AUG-2004 16:08:57 05-AUG-04
: 1 05-AUG-2004 16:08:51 05-AUG-04 <-- wrong!
: 16 05-AUG-2004 16:08:00 05-AUG-04 <-- in fact they are mostly wrong!
: 2 05-AUG-2004 19:08:45 05-AUG-04
: 2 05-AUG-2004 19:08:15 05-AUG-04
: 2 05-AUG-2004 19:08:32 05-AUG-04
: 11 05-AUG-2004 20:08:54 05-AUG-04
I suppose they are all right.
-- Peter Marksteiner Vienna University Computer CenterReceived on Fri Aug 06 2004 - 03:17:05 CDT
![]() |
![]() |