Forums
This topic is locked
Order By Date
Posted 01 Jul 2002 02:05:02
1
has voted
01 Jul 2002 02:05:02 Russell Marshall posted:
I am designing a site that allows me to add support requests.When a request is added the date is added using a hidden field and now() which works fine.
When I display the list of support requests I want them to be displayed in the order newest at the top and oldest at the bottom.
To acheive this I used the line
ORDER BY Date DESC
Unfortunately this does not work as it thinks that 01/07/2002 is older than 27/06/2002 because is simply looks at the entry as a number and not a date and sorts on the 1st then 2nd then 3rd number etc.
How do I sort by date.
Best regards
Davrus
Replies
Replied 01 Jul 2002 02:43:39
01 Jul 2002 02:43:39 Owen Eastwick replied:
First, rename the Date field, Date is a reserved word and it can cause problems if you use it as a field name, use something like RequestDate or whatevr you fancy.
Second, ensure that the data type of the field is DateTime.
ORDER BY DateFieldName DESC should work.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Second, ensure that the data type of the field is DateTime.
ORDER BY DateFieldName DESC should work.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 01 Jul 2002 11:00:31
01 Jul 2002 11:00:31 Russell Marshall replied:
Thanks Oeastwick.
This has done the trick.
This has done the trick.