TO_SECOND (Lakehouse v1)
Converts a date with time (timestamp/datetime) to a UInt8 number containing the number of the second in the minute (0-59).
Analyze Syntax
Section titled “Analyze Syntax”func.to_second(<expr>)Analyze Examples
Section titled “Analyze Examples”func.to_second('2023-11-12 09:38:18.165575')
┌──────────────────────────────────────────────┐│ func.to_second('2023-11-12 09:38:18.165575') ││ UInt8 │├──────────────────────────────────────────────┤│ 18 │└──────────────────────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”TO_SECOND(<expr>)Arguments
Section titled “Arguments”| Arguments | Description |
|---|---|
<expr> | timestamp |
Return Type
Section titled “Return Type”TINYINT
SQL Examples
Section titled “SQL Examples”SELECT to_second('2023-11-12 09:38:18.165575')
┌─────────────────────────────────────────┐│ to_second('2023-11-12 09:38:18.165575') ││ UInt8 │├─────────────────────────────────────────┤│ 18 │└─────────────────────────────────────────┘