mySQL把秒转换成日期

mysql> SELECT SEC_TO_TIME (3600);
+--------------------+
| SEC_TO_TIME (3600) |
+--------------------+
| 01:00:00           |
+--------------------+
1 row in set (0.00 sec)
 
mysql> SELECT TIME_TO_SEC('00:01:00') A;
+----+
| A  |
+----+
| 60 |
+----+
1 row in set (0.00 sec)
 
 
如:
SELECT SEC_TO_TIME(sum(time_len_s)) FROM `cti_agent_login`;
原文地址:https://www.cnblogs.com/hailexuexi/p/4482176.html