DATE

Description

Syntax

datev2 DateV2 type, the current range of values is [‘0000-01-01’,’9999-12-31’], and the default print form is ‘YYYYY-MM-DD’.

note

DATEV2 type is more efficient than DATE type. During calculation, DATEV2 can save half of the memory usage compared with DATE.

example

1. SELECT CAST('2003-12-31 01:02:03' as DATEV2);
2. +---------------------------------------+
3. | CAST('2003-12-31 01:02:03' AS DATEV2) |
4. +---------------------------------------+
5. | 2003-12-31                            |
6. +---------------------------------------+

keywords

DATE