MySQL 中的 sec_to_time() 函数

首页 / MySQL入门教程 / MySQL 中的 sec_to_time() 函数

sec_to_time()是MySQL日期/时间函数。它用于将给定的秒转换为时间。

语法

select sec_to_time(second);

参数

second:获取时间的第二个值。

例子1

select sec_to_time(2000);

输出

MySQL Datetime sec_to_time() Function

例子2

select sec_to_time(40);

输出

MySQL Datetime sec_to_time() Function

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

研发效率破局之道 -〔葛俊〕

Node.js开发实战 -〔杨浩〕

Python自动化办公实战课 -〔尹会生〕

Spring编程常见错误50例 -〔傅健〕

性能优化高手课 -〔尉刚强〕

eBPF核心技术与实战 -〔倪朋飞〕

快手 · 移动端音视频开发实战 -〔展晓凯〕

PPT设计进阶 · 从基础操作到高级创意 -〔李金宝(Bobbie)〕

给程序员的写作课 -〔高磊〕

好记忆不如烂笔头。留下您的足迹吧 :)