v.23.3New Feature
Add parseDateTime and parseDateTimeInJodaSyntax functions for DateTime parsing
Add new functionparseDateTime/parseDateTimeInJodaSyntaxaccording to the specified format string. parseDateTime parses String to DateTime in MySQL syntax, parseDateTimeInJodaSyntax parses in Joda syntax. #46815 (李扬).
Why it matters
These functions address the need for flexible string-to-DateTime parsing by allowing users to specify the date-time format explicitly. This enhances ClickHouse’s capability to interpret datetime strings in various common formats, increasing compatibility and user convenience.How to use it
UseparseDateTime(string, format) to parse a datetime string according to MySQL format syntax. Use parseDateTimeInJodaSyntax(string, format) to parse using Joda format syntax. Both functions return a DateTime value parsed based on the given format string.