[SLUG] Mysql question

From: Russ Wright (rwrigh10@tampabay.rr.com)
Date: Wed Apr 20 2005 - 10:55:31 EDT


Hi all

I inherited a MYSQL table where the StartDate and StartTime fields are
VARCHAR. I am having a problem retrieving events for a specific date in
the right time order.

For example:
SELECT StartDate, StartTime FROM `calendar` WHERE `StartDate` =
'4/16/2005' order by `StartTime`

Returns:
STARTDATE STARTTIME
---------------------
4/16/2005 12:00:00 AM
4/16/2005 6:00:00 PM
4/16/2005 8:00:00 AM

Notice that the events are not in the right order by time. How do I fix
this?

Regards
Russ

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:52:21 EDT