VeloDB Cloud
SQL Manual
Data Types
DATE

DATE

Description

DATE Function

Syntax:

DATE(expr) 

Turn the input type into a DATE type

The current range of DATE type is ['0000-01-01', '9999-12-31'], and it will be printed as 'YYYY-MM-DD' by default.

Note

If you use version 1.2 and above, we strongly recommended that you use the DATEV2 type instead of the DATE type since DATEV2 is more efficient.

Example

mysql> SELECT DATE('2003-12-31 01:02:03');
    -> '2003-12-31'

Keywords

DATE