v.23.5Improvement

Function toUnixTimestamp Updated to Accept Date and Date32 Arguments

Function toUnixTimestamp now accepts Date and Date32 arguments. #49989 (Victor Krasnov).
The toUnixTimestamp function now supports Date and Date32 data types as input arguments.

Why it matters

This enhancement allows users to convert Date and Date32 values directly to Unix timestamps without needing to cast them explicitly, simplifying queries and improving usability.

How to use it

Use the toUnixTimestamp function with Date or Date32 values directly, for example:

SELECT toUnixTimestamp(date_column) FROM table;