TO_MILLISECONDS (Lakehouse v1)
Converts a specified number of milliseconds into an Interval type.
- Accepts positive integers, zero, and negative integers as input.
Analyze Syntax
Section titled “Analyze Syntax”func.to_milliseconds(<milliseconds>)Analyze Examples
Section titled “Analyze Examples”func.to_milliseconds(2)┌──────────────────────────────────────────────────────┐│ func.to_milliseconds(2) │├──────────────────────────────────────────────────────┤│ 0:00:00.002 │└──────────────────────────────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”TO_MILLISECONDS(<milliseconds>)Return Type
Section titled “Return Type”Interval (in the format hh:mm:ss.sss).
SQL Examples
Section titled “SQL Examples”SELECT TO_MILLISECONDS(2), TO_MILLISECONDS(0), TO_MILLISECONDS((- 2));
┌────────────────────────────────────────────────────────────────┐│ to_milliseconds(2) │ to_milliseconds(0) │ to_milliseconds(- 2) │├────────────────────┼────────────────────┼──────────────────────┤│ 0:00:00.002 │ 00:00:00 │ -0:00:00.002 │└────────────────────────────────────────────────────────────────┘