I have a column of type datetime in MySql table. Stored values are like this:
2008-02-15 17:21:56
2008-02-15 17:22:02
2008-02-15 17:22:03
Now I want to query some records based on this column but I have only date part not time part.
So I am querying like this in zend.
$select->where('tableName.columnName = ?', '2008-02-15' );
But it does not match any record. How can I query without time part.
Thanks
try this
WHERE DATE(tableName.columnName) = '2008-02-15'