TIME_SLOT (Lakehouse v1)
Rounds the time to the half-hour.
Analyze Syntax
Section titled “Analyze Syntax”func.time_slot(<expr>)Analyze Examples
Section titled “Analyze Examples”func.time_slot('2023-11-12 09:38:18.165575')┌───────────────────────────────-───-───-──────┐│ func.time_slot('2023-11-12 09:38:18.165575') ││ Timestamp │├─────────────────────────────────-───-────────┤│ 2023-11-12 09:30:00 │└─────────────────────────────────-───-────────┘SQL Syntax
Section titled “SQL Syntax”time_slot(<expr>)Arguments
Section titled “Arguments”| Arguments | Description |
|---|---|
<expr> | timestamp |
Return Type
Section titled “Return Type”TIMESTAMP, returns in “YYYY-MM-DD hh:mm:ss.ffffff” format.
SQL Examples
Section titled “SQL Examples”SELECT time_slot('2023-11-12 09:38:18.165575')
┌─────────────────────────────────────────┐│ time_slot('2023-11-12 09:38:18.165575') ││ Timestamp │├─────────────────────────────────────────┤│ 2023-11-12 09:30:00 │└─────────────────────────────────────────┘