clickhouse toStartOfHour
The toStartOfHour function in ClickHouse is used to round a DateTime value down to the nearest hour. It returns a new DateTime value with the minutes, seconds, and milliseconds set to zero.
Here's an example of how to use the toStartOfHour function in ClickHouse:
SELECT toStartOfHour(DateTime) AS StartOfHour
FROM your_table;
This query will return the DateTime values rounded down to the nearest hour.
原文地址: https://www.cveoy.top/t/topic/hL6Q 著作权归作者所有。请勿转载和采集!