v.18.14New Feature
Added ISO week number functions: toISOWeek, toISOYear, toStartOfISOYear, and toDayOfYear
Added functions for working with the ISO week number:toISOWeek,toISOYear,toStartOfISOYear, andtoDayOfYear. #3146
Why it matters
These functions provide users with the ability to extract and manipulate date components based on the ISO week date system, which is widely used in business and international contexts. They solve the problem of handling week-based year calculations accurately and consistently, improving date-related data processing and reporting.How to use it
Users can apply the new functions in their SQL queries directly, for example:SELECT toISOWeek(date_column), toISOYear(date_column), toStartOfISOYear(date_column), toDayOfYear(date_column) FROM table;This allows retrieving the ISO week number, ISO year, the first day of the ISO year, and the day of the year respectively.