MySQL – Select records matching date, ignoring the time portion
Let us assume you have tasks scheduled for a given day in a planner. You wish to select all tasks in the given day. The following query will serve the purpose (the DATE function does the trick)
select * from task where DATE(startdatetime) = DATE('2010-05-29');