หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Applies to:
Databricks SQL
Databricks Runtime 18.3 and above
Returns the number of seconds since midnight for a TIME value.
Syntax
time_to_seconds(expr)
Arguments
expr: A TIME expression.
Returns
A DECIMAL. Fractional seconds are preserved in the decimal portion.
Examples
> SELECT time_to_seconds(TIME'14:30:00.5');
52200.500000
> SELECT time_to_seconds(TIME'00:00:00');
0.000000