Return the difference between two time expressions:
SELECT TIMEDIFF("13:10:11", "13:10:10");
Try it Yourself »
The TIMEDIFF() function returns the difference between two time/datetime expressions.
Note: time1 and time2 should be in the same format, and the calculation is time1 - time2.
TIMEDIFF(
time1,
time2)
Parameter | Description |
---|---|
time1 | Required. A time value |
time2 | Required. Another time value |
Works in: | From MySQL 4.0 |
---|
Return the difference between two datetime expressions:
SELECT TIMEDIFF("2017-06-25 13:10:11", "2017-06-15 13:10:10");
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!