TIME_SLICE (Lakehouse v2)
Converts a given time to the beginning or end of a time interval.
Analyze Syntax
Section titled “Analyze Syntax”func.time_slice(<datetime>, INTERVAL <n> <unit>[, <boundary>])Analyze Examples
Section titled “Analyze Examples”func.time_slice('2024-06-15 14:35:00', text('INTERVAL 15 MINUTE'))
┌───────────────────────┐│ '2024-06-15 14:30:00' │└───────────────────────┘SQL Syntax
Section titled “SQL Syntax”TIME_SLICE(<datetime>, INTERVAL <n> <unit>[, <boundary>])SQL Examples
Section titled “SQL Examples”SELECT TIME_SLICE('2024-06-15 14:35:00', INTERVAL 15 MINUTE);
┌─────────────────────┐│ 2024-06-15 14:30:00 │└─────────────────────┘