View Full Version : ordering times

09-11-2006, 01:03 AM
i have some vlaues in a database, they are 12 hour times, how would i go about sorting it so 12 comes before 1, as it is its going 1 2 3 4.... 12 etc etc, do i have to use a 24 hour time? then from there function it to show 12 hour when displayed

09-11-2006, 01:11 AM
Use the data type "time" and your problems are solved.

09-11-2006, 01:27 AM
i am using "time"

09-11-2006, 05:13 PM
If you are, then sorting works like you want.

09-11-2006, 05:35 PM
yes you should be using 24 hours. how otherwise do you distinguish something that happend at 1 a.m. from 1 p.m. event?