v.21.2New Features
Function formatDateTime Enhances Date Formatting to Include Quarter Support
FunctionformatDateTimesupport the%Qmodification to format date to quarter. #19224 (Jianmei Zhang).
Why it matters
This feature enables users to easily extract and format the quarter of a given date directly within theformatDateTime function, simplifying date-time formatting tasks that involve quarters, and enhancing date manipulation capabilities in ClickHouse.How to use it
Use theformatDateTime function with the %Q format specifier in the format string to get the quarter of the year. For example:SELECT formatDateTime(your_date_column, '%Q') FROM your_table;