时间戳转换成日期展示的方法 且 搜索范围

FROM_UNIXTIME(device.register_time,'%Y-%m-%d %H:%i:%s')
注意: 这个只能转10位数字的时间戳

搜索范围

select id as 约课id,FROM_UNIXTIME(attendance_time/1000,'%Y-%m-%d %H:%i:%s') as 上课时间 from uuu 
where FROM_UNIXTIME(attendance_time/1000,'%Y-%m-%d %H:%i:%s') >"2020-03-20 00:00:00" group by 上课时间 DESC

注意这里如果使用别名 会不正确

原文地址:https://www.cnblogs.com/kaibindirver/p/11589679.html