Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: order by date
The to_date only changes the display of the date, not the way Oracle will
sort. If you want to sort by just month and not day or year use:
to_char(datum, 'MM.DD.YYYY')
Also if datum is already a date your query will give you an error.
Kenny Gump
Steffi wrote in message <379D7B68.D3904275_at_planet.de>...
>hi..
>I want to order my values by month.
>
>I tested this, but it's not correct:
>can anybody help me?
>
>CURSOR cdate IS
>SELECT name, datum
>FROM feiertage
>ORDER BY to_date(datum,'MM.DD.YYYY') ASC;
>.
>.
>htp.TableData(TO_CHAR(crec.datum,'DD.MM.YYYY'));
>.
>.
Received on Tue Jul 27 1999 - 06:37:28 CDT
![]() |
![]() |