DATE FUNCTION
Extract the date part from a datetime expression. This function returns the year, month, and day portions, discarding the time component.
Syntax
DATE(expr)Description
Examples
SELECT DATE('2013-07-18 12:21:32');
+-----------------------------+
| DATE('2013-07-18 12:21:32') |
+-----------------------------+
| 2013-07-18 |
+-----------------------------+Last updated
Was this helpful?

