to_date

Description

Converts a DATETIME value into a date.

Syntax

DATE TO_DATE(DATETIME datetime)

Examples

MySQL > select to_date("2020-02-02 00:00:00");
+--------------------------------+
| to_date('2020-02-02 00:00:00') |
+--------------------------------+
| 2020-02-02                     |
+--------------------------------+

keyword

TO_DATE