ans
time_to_sec(timediff(endTime, startTime))
timestampdiff(second, startTime, endTime)
unix_timestamp(endTime) -unix_timestamp(startTime)
tips
mysql的时间相减是做了一个隐式转换操作,直接把年月日时分秒拼起来:2022年3月27日 19:15:56
转换为 20220327191556
所以必须使用上述函数进行相减
time_to_sec(timediff(endTime, startTime))
timestampdiff(second, startTime, endTime)
unix_timestamp(endTime) -unix_timestamp(startTime)
mysql的时间相减是做了一个隐式转换操作,直接把年月日时分秒拼起来:2022年3月27日 19:15:56
转换为 20220327191556
所以必须使用上述函数进行相减
JAVA 两个类同时实现同一个接口
java 时间相减得到小时 java两个时间相减得到天数
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M