DATE

Click to skip syntax diagram
Read syntax diagramSkip visual syntax diagram>>-DATE--(--expression--)--------------------------------------><
 

The DATE function returns a date from a value.

expression
The argument must be an expression that returns a value of one of the following built-in data types: a date, a timestamp, a character string, a graphic string, or any numeric data type.

The result of the function is a date. If the argument can be null, the result can be null; if the argument is null, the result is the null value.

The other rules depend on the data type of the argument:

Note

Syntax alternatives: When the argument is a date, timestamp, or character string, the CAST specification should be used for maximal portability. For more information, see CAST specification.

Examples