教程 > sql 教程 > 阅读:31

sql sec-ag捕鱼王app官网

返回 sql date 函数


sec_to_time()函数 将秒数转换为“hh:mm:ss”格式

语法

sec_to_time()函数语法如下

sec_to_time(seconds)

说明

返回由指定的参数seconds的值转换的小时、分钟和秒,作为 'hh:mm:ss' 或 hhmmss 格式的值,取决于函数是在字符串还是数字上下文中使用。

示例

mysql> select sec_to_time(2378);
 --------------------------------------------------------- 
| sec_to_time(2378)                                       |
 --------------------------------------------------------- 
| 00:39:38                                                |
 --------------------------------------------------------- 
1 row in set (0.00 sec)

返回 sql date 函数

查看笔记

扫码一下
查看教程更方便
网站地图