PJ
|
| Posted: 03/13/2002, 11:21 AM |
|
I posted a requested for help a day or so ago and it was pointed out that
the DATE_FORMAT expression returns a string hence a sort on that field was
odd.
How can I sort a DATE_FORMAT expression into a chronological order?
Thanks in advance
PJ
|
|
|
 |
Alexey Alexapolsky
|
| Posted: 03/14/2002, 2:20 AM |
|
this should work
DATE_FORMAT(datefield1, '%d %M
%Y') AS foo ORDER BY datefield1 Desc
when you sort by date field name it works ok , but
when you have an alias with the same name it overrides your field
with character data
--
Alex
CodeCharge Developer
"PJ" <apis@globalnet.co.uk> wrote in message
news:a6o8s8$d1p$1@news.codecharge.com...
> I posted a requested for help a day or so ago and it was pointed out that
> the DATE_FORMAT expression returns a string hence a sort on that field was
> odd.
>
> How can I sort a DATE_FORMAT expression into a chronological order?
>
> Thanks in advance
>
> PJ
>
>
>
|
|
|
 |
|