Forums
This topic is locked
Distinct + Order By
Posted 14 May 2002 22:57:00
1
has voted
14 May 2002 22:57:00 Peter Sampson posted:
I am usingSelect DISTINCT Month
FROM tblNews
The problem is that the months are alphabetical not in calendar order.
How can I change this?
Replies
Replied 16 May 2002 14:11:29
16 May 2002 14:11:29 Julio Taylor replied:
what datatype is the MONTH field?
P.S. i killed kenny
P.S. i killed kenny
Replied 17 May 2002 14:13:56
17 May 2002 14:13:56 Peter Sampson replied:
text?
Replied 17 May 2002 14:25:59
17 May 2002 14:25:59 Julio Taylor replied:
i am assuming that you are using MySQL.
the best solution would be use a DATE or TIMESTAMP field for the date recording in your table.
you will then be able to sort the in calendar order.
Let me know if you need some more help in how to handle/filter your datefields to display exactly what you want.
i hope this helps.
--J
P.S. i killed kenny
the best solution would be use a DATE or TIMESTAMP field for the date recording in your table.
you will then be able to sort the in calendar order.
Let me know if you need some more help in how to handle/filter your datefields to display exactly what you want.
i hope this helps.
--J
P.S. i killed kenny