跳到主要内容
跳到主要内容

SEC_TO_TIME

sec_to_time

description

Syntax

TIME sec_to_time(INT timestamp)

参数为INT类型时间戳,函数返回TIME类型时间。

example

mysql >select sec_to_time(time_to_sec(cast('16:32:18' as time)));
+----------------------------------------------------+
| sec_to_time(time_to_sec(CAST('16:32:18' AS TIME))) |
+----------------------------------------------------+
| 16:32:18 |
+----------------------------------------------------+
1 row in set (0.53 sec)

keywords

SEC_TO_TIME