I have a table in the MySQL database that is set up with DATETIME
. I need to SELECT
in this table only by DATE and excluding the time.
How do I SELECT
in this table by only date and bypassing the time, even if that specific column is set to DATETIME
?
Now it is:
2012-01-23 09:24:41
I need to do a SELECT
only for this: 2012-01-23
SELECT DATE(ColumnName) FROM tablename;
More on MySQL DATE() function.