DATE(expr)
Extracts the date part of the date or datetime expression expr.
SELECT DATE('2013-07-18 12:21:32'); +-----------------------------+ | DATE('2013-07-18 12:21:32') | +-----------------------------+ | 2013-07-18 | +-----------------------------+
Until MariaDB 5.5.32, some versions of MariaDB returned 0000-00-00
when passed an invalid date. From 5.5.32, NULL is returned.
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/date-function/