DATETIME_PARSE
Syntax
DATETIME_PARSE( value )
Description
Converts the value
expression to date and time format. Unlike DATETIME, it supports multiple formats. The expression is processed on the ClickHouse® source side. For more information on the supported formats, see the relevant ClickHouse® documentation.
Argument types:
value
—String
Return type: Datetime
Examples
DATETIME_PARSE("2019-01-02 03:04:05") = #2019-01-02 03:04:05#
DATETIME_PARSE("20190102030405") = #2019-01-02 03:04:05#
DATETIME_PARSE("20190102 030405") = #2019-01-02 03:04:05#
DATETIME_PARSE("2019.01.02 03:04:05") = #2019-01-02 03:04:05#
DATETIME_PARSE("02/01/2019 03:04:05") = #2019-01-02 03:04:05#
DATETIME_PARSE("2019-01-02 03:04") = #2019-01-02 03:04:00#
DATETIME_PARSE("2019-01-02 030405") = #2019-01-02 03:04:05#
DATETIME_PARSE("2019 Jan 02 03:04:05") = #2019-01-02 03:04:05#
Data source support
ClickHouse 21.8
.
Previous
Next