PDA

Click to See Complete Forum and Search --> : Doing Time in SQL


gvirden
Jan 2nd, 2000, 05:27 AM
...when I use the SQL statement--

"ORDER BY latest.Date DESC"

I certainly get my dates in decending order. But I've noticed that several records recorded on the same day aren't sorted with the most recent record being the first record. How can I use time to further sort decending dates by decending time?

Clunietp
Jan 2nd, 2000, 08:01 AM
Do you have a field called 'TIME'? If time is included in the Date field, it should do it automatically, unless you have your field as a text field and not a date field.....

If you have an autonumber field, you could also sort by that field, descending, because the most recent records will have a greater autonumber....

HTH

Tom

RogerH
Jan 3rd, 2000, 11:49 AM
If multiple records have the same value and your sorting by that value, it's not defined in what order the records with the same value come back.

The best is, as Tom mentioned, to use an auto value.

Roger