I need to compare dates in MySQL ignoring the time portion in a DateTime
column. I have tried the following SQL.
SELECT * FROM order_table where order_date=date_format('2012-05-03', '%Y-%m-%d');
It doesn't retrieve any row even though there is a date 2012-05-03 10:16:46
in MySQL table. How can the time portion in the DateTime
field be ignored while comparing dates in MySQL?