v.18.16Improvement

Modulo Function Support for Date and DateTime Types

The modulo function works for Date and DateTime data types. #3385
Added support for the modulo function on Date and DateTime data types in ClickHouse.

Why it matters

This feature enables users to perform modulo operations directly on date and datetime values, expanding the arithmetic capabilities of these data types and allowing for more flexible temporal data processing.

How to use it

Use the modulo operator (%) with Date or DateTime columns or values in your queries, for example:

SELECT event_date % 7 FROM events;