Home >Database >Mysql Tutorial >What will MySQL return if we include the date part and the time part as arguments to the TIMEDIFF() function?
After converting the difference between the date and time values supplied as arguments to the TIMEDIFF() function, MySQL returns the output of the time value.
mysql> Select TIMEDIFF('2017-10-22 04:05:45', '2017-10-21 03:04:44')AS 'Difference in Time'; +--------------------+ | Difference in Time | +--------------------+ | 25:01:01 | +--------------------+ 1 row in set (0.00 sec)
In this example, we can see that MySQL converts the difference of date and time values into a time value and Returns the output as a time value.
The above is the detailed content of What will MySQL return if we include the date part and the time part as arguments to the TIMEDIFF() function?. For more information, please follow other related articles on the PHP Chinese website!