计算两个时间字段差 timestampdiff
timestampdiff(n,char(timestamp('2023-11-20 12:00:00') - timestamp('2023-11-19 12:00:00')))
n代表返回的单位:
1:毫秒
2:秒
4:分
8:时
16:天
32:周
64:月
128:季度
256:年
计算两个时间字段差 timestampdiff
timestampdiff(n,char(timestamp('2023-11-20 12:00:00') - timestamp('2023-11-19 12:00:00')))
n代表返回的单位:
1:毫秒
2:秒
4:分
8:时
16:天
32:周
64:月
128:季度
256:年