TO_MILLISECONDS(Lakehouse v1)
将指定数量的毫秒转换为 Interval 类型。
- 接受正整数、零和负整数作为输入。
Analyze 语法
Section titled “Analyze 语法”func.to_milliseconds(<milliseconds>)Analyze 示例
Section titled “Analyze 示例”func.to_milliseconds(2)┌──────────────────────────────────────────────────────┐│ func.to_milliseconds(2) │├──────────────────────────────────────────────────────┤│ 0:00:00.002 │└──────────────────────────────────────────────────────┘SQL 语法
Section titled “SQL 语法”TO_MILLISECONDS(<milliseconds>)Interval(格式为 hh:mm:ss.sss)。
SQL 示例
Section titled “SQL 示例”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 │└────────────────────────────────────────────────────────────────┘