TO_SECOND(Lakehouse v1)
将带时间的日期(timestamp/datetime)转换为 UInt8 数字,表示分钟中的秒数(0-59)。
Analyze 语法
Section titled “Analyze 语法”func.to_second(<expr>)Analyze 示例
Section titled “Analyze 示例”func.to_second('2023-11-12 09:38:18.165575')
┌──────────────────────────────────────────────┐│ func.to_second('2023-11-12 09:38:18.165575') ││ UInt8 │├──────────────────────────────────────────────┤│ 18 │└──────────────────────────────────────────────┘SQL 语法
Section titled “SQL 语法”TO_SECOND(<expr>)| 参数 | 说明 |
|---|---|
<expr> |
时间戳 |
TINYINT
SQL 示例
Section titled “SQL 示例”SELECT to_second('2023-11-12 09:38:18.165575')
┌─────────────────────────────────────────┐│ to_second('2023-11-12 09:38:18.165575') ││ UInt8 │├─────────────────────────────────────────┤│ 18 │└─────────────────────────────────────────┘