美文网首页
mysql 时间

mysql 时间

作者: 左手猫 | 来源:发表于2019-05-07 16:59 被阅读0次

MySQL now() 只能精确到秒。 MySQL 中也没有存储带有毫秒、微秒的日期时间类型。

mysql json 对象中的时间对比

SELECT user_id,begin_time,vip_json FROM vip WHERE CONVERT_TZ(STR_TO_DATE(REPLACE(JSON_EXTRACT(vip_json, '$[0].start_time'),'"',''),'%Y-%m-%dT%H:%i:%s.%fZ') ,'+00:00','+08:00')<begin_time order by begin_time ;

相关文章

网友评论

      本文标题:mysql 时间

      本文链接:https://www.haomeiwen.com/subject/smbeoqtx.html