select from_unixtime( cast(1597651229344/1000 as int),‘yyyy-MM-dd HH:mm:ss‘)
使用函数:STR_TO_DATE(str, format)
使用示例:select * from h_hotelcontext where now() between STR_TO_DATE(Start_time,‘%Y-%m-%d %H:%i:%s‘) and STR_TO_DATE(End_time,‘%Y-%m-%d %H:%i:%s‘);
使用注意点:format的格式为%Y-%m-%d %H:%i:%s ,中间的分隔符也需要跟你传入的字符串格式对上
原文:https://www.cnblogs.com/yangxusun9/p/13566803.html