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)