crmpicco
03-04-2005, 11:09 AM
How do i sort a HTML table by date (newest date first).
This code below sorts oldest date first:
Set rs=con.execute("select * from trip_master where agencyid = '"&agencyid&"' and newdate > '" &new_date& "' and regular_trip <> 'Cancelled' order by date_of_booking desc limit 50")
but
Set rs=con.execute("select * from trip_master where agencyid = '"&agencyid&"' and newdate > '" &new_date& "' and regular_trip <> 'Cancelled' order by date_of_booking asc limit 50")
doesnt dort newest first. How do i get around this? Unfortunately it is in the DB as a varchar in format 'DD/MM/YY'
Picco
This code below sorts oldest date first:
Set rs=con.execute("select * from trip_master where agencyid = '"&agencyid&"' and newdate > '" &new_date& "' and regular_trip <> 'Cancelled' order by date_of_booking desc limit 50")
but
Set rs=con.execute("select * from trip_master where agencyid = '"&agencyid&"' and newdate > '" &new_date& "' and regular_trip <> 'Cancelled' order by date_of_booking asc limit 50")
doesnt dort newest first. How do i get around this? Unfortunately it is in the DB as a varchar in format 'DD/MM/YY'
Picco