hours_diff
hours_diffβ
descriptionβ
Syntaxβ
INT hours_diff(DATETIME enddate, DATETIME startdate)
The difference between the start time and the end time is a few hours
exampleβ
mysql> select hours_diff('2020-12-25 22:00:00','2020-12-25 21:00:00');
+----------------------------------------------------------+
| hours_diff('2020-12-25 22:00:00', '2020-12-25 21:00:00') |
+----------------------------------------------------------+
| 1 |
+----------------------------------------------------------+
keywordsβ
hours_diff