Skip to main content

DATE

Description​

Extracts the date from the datetime.

Syntax​

DATE(<datetime>)

Parameters​

ParameterDescription
<datetime>A valid date expression

Return Value​

Returns the date part of the datetime.

Examples​

select date('2010-12-02 19:28:30');
+----------------------------------------------------+
| date(cast('2010-12-02 19:28:30' as DATETIMEV2(0))) |
+----------------------------------------------------+
| 2010-12-02 |
+----------------------------------------------------+