TO_DATE
Converts the input expressions to the corresponding date.
Syntax
TO_DATE(in timestamp) → date
in: The date is extracted from the timestamp.
Examples
TO_DATE example
TO_DATE(numeric_expression int32) → date
numeric_expression: A Unix epoch timestamp.
Examples
TO_DATE example
TO_DATE(numeric_expression float) → date
numeric_expression: A Unix epoch timestamp.
Examples
TO_DATE example
TO_DATE(numeric_expression int64) → date
numeric_expression: A Unix epoch timestamp.
Examples
TO_DATE example
TO_DATE(string_expression varchar, format varchar, replaceErrorWithNull int32) → date
string_expression: The string from which to extract the date.
format: String to specify format of the date.
replaceErrorWithNull: If 0, the function will fail when given malformed input. If 1, the function will return NULL when given the malformed input.
Examples
TO_DATE example
TO_DATE(string_expression varchar, format varchar) → date
string_expression: String from which to extract the date.
format: String to specify format of the date.
Examples
TO_DATE example
TO_DATE(numeric_expression double) → date
numeric_expression: A Unix epoch timestamp.
Examples
TO_DATE example
Last updated