DATE

Description

DATE function

Syntax

Date Convert input type to DATE type date Date type, the current range of values is [‘0000-01-01’,’9999-12-31’], and the default print form is ‘YYYYY-MM-DD’.

note

If you use version 1.2 and above, it is strongly recommended that you use the DATEV2 type instead of the DATE type as DATEV2 is more efficient than DATE type。

example

  1. SELECT DATE('2003-12-31 01:02:03');
  2. +-----------------------------+
  3. | date('2003-12-31 01:02:03') |
  4. +-----------------------------+
  5. | 2003-12-31 |
  6. +-----------------------------+

keywords

DATE