----- Original Message ----- From: "Victor Pendleton" <[EMAIL PROTECTED]> To: "'Dirk Bremer (NISC) '" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, April 16, 2004 15:57 Subject: RE: SQL Query Question
> If your data is stored in the following format > 2004-04-16 00:00:00 > you can do WHERE queue_time = CURRENT_DATE() + 0 > You will also be able to take advantage of an index. > .... > Else, if you data is kept in the datetime format, > 2004-04-16 15:53:27 > one option is to do > WHERE DATE_FORMAT(queue_time, '%Y%m%d') = CURRENT_DATE() + 0 > ...no index usage though Victor, The data defined as a timestamp, i.e. a number rather than a string, so it has YYYYMMDDHHMMSS values. So it looks like I'll need to do some type of substring on it. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]