Home >Database >Mysql Tutorial >How to calculate the difference between two time values in MySQL?
With the TIMEDIFF() MySQL function, you can calculate the difference between two time values.
mysql> Select TIMEDIFF('04:05:45','03:05:45') AS ‘Difference in Time’; +---------------------------------+ | Difference in Time | +---------------------------------+ | 01:00:00 | +---------------------------------+ 1 row in set (0.00 sec)
The above is the detailed content of How to calculate the difference between two time values in MySQL?. For more information, please follow other related articles on the PHP Chinese website!