TIMEDIFF(t,s) is a time function that calculates the time value between a start and end time.

Values t and s: When used in a function, the expressions t and s must supply a time value, a time stamp value, or an alphanumeric value that matches the current time or time stamp format. The arguments must have the same data type, in other words, be either a time value or a time stamp value.

Result of TIMEDIFF(t,s) Function

Positive difference between t and s

Time Value

t or s are time stamp values for alphanumeric values that match the current time stamp format.

The dates in the time stamp value are used to calculate TIMEDIFF(t,s).

Difference of more than 9999 hours

Number of hours modulo 10000

t or s is a NULL value

NULL Value