Date: 06/25/08 (MySQL Communtiy) Keywords: mysql, sql "mydate" is a DATETIME field. I need to search this field with DATE input and ran into this: mysql> SELECT COUNT(*) FROM program WHERE mydate LIKE '2008-04-22%'; My table may not be normalized properly (DATETIME instead of separate DATE and TIME fields), but I'd like to know the best approach for searching based on the current DATETIME field.
|