v.23.12Improvement

Supports case-insensitive first argument for date_trunc function

Allows to use the date_trunc function with a case-insensitive first argument. Both cases are now supported: SELECT date_trunc('day', now()) and SELECT date_trunc('DAY', now()). #57624 (Yarik Briukhovetskyi).
The date_trunc function in ClickHouse now supports case-insensitive first arguments, allowing users to specify intervals like 'day' or 'DAY' interchangeably.

Why it matters

This feature enhances usability by removing the case sensitivity constraint on the first argument of date_trunc. It prevents errors and improves user experience by allowing more flexible input formats for date truncation intervals.

How to use it

Use the date_trunc function as before, but now you can write the interval argument in any case. For example:

SELECT date_trunc('day', now())
SELECT date_trunc('DAY', now())