v.23.3New Feature

Add parseDateTime and parseDateTimeInJodaSyntax functions for DateTime parsing

Add new function parseDateTime/parseDateTimeInJodaSyntax according to the specified format string. parseDateTime parses String to DateTime in MySQL syntax, parseDateTimeInJodaSyntax parses in Joda syntax. #46815 (李扬).
Added new functions parseDateTime and parseDateTimeInJodaSyntax to parse strings into DateTime values using specified format strings in MySQL and Joda syntax respectively.

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

Use parseDateTime(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.