v.22.7New Feature

Support parseTimeDelta function for time interval parsing

Support parseTimeDelta function. It can be used like ;-+,: can be used as separators, eg. 1yr-2mo, 2m:6s: SELECT parseTimeDelta('1yr-2mo-4w + 12 days, 3 hours : 1 minute ; 33 seconds'). #39071 (jiahui-97).
Added parseTimeDelta function for parsing human-readable time intervals with various separators.

Why it matters

The parseTimeDelta function allows users to convert complex, human-readable time interval strings into a ClickHouse interval value, supporting multiple separators like ;-+,:. This simplifies interval parsing and manipulation in queries where flexible time delta input is needed.

How to use it

Use the parseTimeDelta function by passing a string representing the time interval with supported units (e.g., yr, mo, w, days, hours, minute, seconds) and separators (;, -, +, ,, :). Example:
SELECT parseTimeDelta('1yr-2mo-4w + 12 days, 3 hours : 1 minute ; 33 seconds')