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