添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
强悍的牛排  ·  myBatis中selectByExampl ...·  2 年前    · 
潇洒的葡萄  ·  git ...·  2 年前    · 

1.日期转时间戳 (yyyy-MM-dd)-> 1589904000000

函数   select  unix_timestamp('2020-05-20');       可以传参 但是注意该函数是到秒 ,到毫秒需要*1000

即unix_timestamp('2020-05-20') * 1000 = 1589904000000

2.时间戳/其他日期格式 转日期 (yyyy-MM-dd)

date(1589904000000)

date(t.create_time) between #{beginTime} and #{endTime}                这个是拿在某一时间段的数据

3.将某一日期格式转换为 yyyy-MM-dd

TO_DAYS(t.create_time)