v.23.10Improvement
Functions toDayOfWeek, toYearWeek, and toWeek Updated to Support String Arguments
FunctionstoDayOfWeek(MySQL alias:DAYOFWEEK),toYearWeek(YEARWEEK) andtoWeek(WEEK) now supportsStringarguments. This makes its behavior consistent with MySQL's behavior. #55589 (Robert Schulze).
Why it matters
This feature addresses inconsistency between ClickHouse and MySQL by allowing these date functions to acceptString input. This enables easier migration and compatibility for users switching from MySQL or working with string-formatted date values.How to use it
Use the functionstoDayOfWeek, toYearWeek, or toWeek and pass string-formatted date arguments directly, for example:SELECT toDayOfWeek('2024-06-20'), toYearWeek('2024-06-20'), toWeek('2024-06-20')