运维网's Archiver
论坛
›
MySQL运维
› mysql中int时间和datetime时间的互相转换
menny
发表于 2018-10-1 09:52:12
mysql中int时间和datetime时间的互相转换
MySQL
1、int时间转换为datetime时间
FROM_UNIXTIME(reg_time)select reg_time, FROM_UNIXTIME(reg_time) from crm_user; 2、datetime时间转换为int时间
unix_timestamp(reg_time)
select reg_time,unix_timestamp(reg_time) from crm_user;
页:
[1]
查看完整版本:
mysql中int时间和datetime时间的互相转换