In MariaDB, TIMEDIFF()
is a built-in date and time function that returns the difference between two time values or datetime values, expressed as a time value.
It’s similar to the DATEDIFF()
function, except that DATEDIFF()
‘s return value is expressed in days.
TIMEDIFF()
accepts two arguments, both of which are time or datetime expressions. It then subtracts the second time from the first.