I have 7 rows in my table like “Date1”,”Date2″… they´re all dateTime, and i need to make a query to select the day, if is the today like:
"Select id,Date1 if Date1==today,Date2 if Date2==today etc..."
the problem is i have the time wich can be any hour in the day,but wherever the time is e need to be based on the day, ignoring the time.
Theres a better way to do that?
Use the
DATE()function to compare only the date values of the datetime fields: