TIME_SLICE

Converts a given time to the beginning or end of a time interval.

Analyze Syntax

func.time_slice(<datetime>, INTERVAL <n> <unit>[, <boundary>])

Analyze Examples

func.time_slice('2024-06-15 14:35:00', text('INTERVAL 15 MINUTE'))

┌───────────────────────┐
 '2024-06-15 14:30:00'  
└───────────────────────┘

SQL Syntax

TIME_SLICE(<datetime>, INTERVAL <n> <unit>[, <boundary>])

SQL Examples

SELECT TIME_SLICE('2024-06-15 14:35:00', INTERVAL 15 MINUTE);

┌─────────────────────┐
 2024-06-15 14:30:00  
└─────────────────────┘