
Untitled
By: a guest on
May 5th, 2012 | syntax:
None | size: 0.42 KB | hits: 10 | expires: Never
Querying Where date_created without time is same as last_updated without time
SELECT * FROM table_name
WHERE DATE(date_created) = DATE(last_updated)
SELECT *
FROM table_name
WHERE DATE_FORMAT(date_created, '%Y-%m-%d') = DATE_FORMAT(last_updated, '%Y-%m-%d')
SELECT *
FROM table_name
WHERE day(date_created) = day(last_updated) and
month(date_created) = month(last_updated) and
year(date_created) = year(last_updated)