标签:sql size diff pre 常用操作 font current nbsp rest
时间戳转日期:
from_unixtime(1569168000,‘yyyy-MM-dd‘) = ‘2019-09-23‘
‘20190903‘转为‘2019-09-23‘:
unix_timestamp(‘20190903‘,‘yyyymmdd‘),‘yyyy-mm-dd‘)
相减的天数大于7天:
datediff(from_unixtime(unix_timestamp(‘20190903‘,‘yyyymmdd‘),‘yyyy-mm-dd‘),from_unixtime(1569168000,‘yyyy-MM-dd‘)) >= 7
获取当前日期:
select current_date -- 如 2019-09-23
标签:sql size diff pre 常用操作 font current nbsp rest
原文地址:https://www.cnblogs.com/tianqizhi/p/11577442.html