TIME_SLOT(Lakehouse v1)
将时间舍入到半小时。
Analyze 语法
Section titled “Analyze 语法”func.time_slot(<expr>)Analyze 示例
Section titled “Analyze 示例”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 语法
Section titled “SQL 语法”time_slot(<expr>)| 参数 | 说明 |
|---|---|
<expr> |
时间戳 |
TIMESTAMP,以“YYYY-MM-DD hh:mm:ss.ffffff”格式返回。
SQL 示例
Section titled “SQL 示例”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 │└─────────────────────────────────────────┘