Syntax:
TIMEDIFF(expr1,expr2)

TIMEDIFF() returns expr1 − expr2 expressed as a time value. expr1 and
expr2 are strings which are converted to TIME or DATETIME expressions;
these must be of the same type following conversion. Returns NULL if
expr1 or expr2 is NULL.

The result returned by TIMEDIFF() is limited to the range allowed for
TIME values. Alternatively, you can use either of the functions
TIMESTAMPDIFF() and UNIX_TIMESTAMP(), both of which return integers.

URL: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html

