Question: how to calculate difference between two times in mysql?
Answer: The MySQL TIMEDIFF() function returns the difference between two time or datetime values. The way it works is, you provide the two values to compare, and TIMEDIFF() subtracts the second value from the first, then returns the result as a time value.