![]() |
| Order by Date not working properly |
|
jamie
HostMySite Sales Rep
![]()
|
I'm inserting data into a database with the following code:
The form that it pulls from has a separate field for the month, date and year, so when the data is entered you get something that looks like this:
When displaying it on a page, I use:
and then output it like this:
The only problem is when it outputs it's not doing so in the proper order - it's looking at the DATE field like a series of numbers, not as an actual date, so in the above code even though it's supposed to output the most recent 5 records it doesn't show the October record - since 10 comes after 1 if you're doing binary sorting instead of actual date sorting. The records actually displayed with the above code are: August 19, 2007 July 15, 2007 May 20, 2007 April 22, 2007 March 17, 2007 So, how can I get it to do an actual date sort? |
||||||||||||||||||||
|
|
|||||||||||||||||||||
| Figured it out |
|
jamie
HostMySite Sales Rep
![]()
|
The code was all right - just needed to change the field type in Access (I know - not my choice of DB) from 'memo' to 'date/time'.
|
||||||||||||
|
|
|||||||||||||
| Order by Date not working properly |
|
||
|



