In this tutorial, you will learn how to get the difference between two dates in MySQL. By using the TIMEDIFF() function you can get the difference between two dates. This function returns the dates difference in HH:MM:SS format.
Below example demonstrates this:
Example:

SELECT TIMEDIFF('2019-12-21 10:02:00','2019-12-20 12:01:01');

Output result:

22:00:59

Written by
Check out this Author's contributed articles.
If you like Tutorialsmint and would like to contribute, you can also write an article using Write an Article. See your article appearing on the Tutorialsmint main page and help other programmers to enhance their knowledge.

Comments(0)

RECENT TUTORIALS
Wed Dec 26 • 08:00 AM GMT
Wed Dec 26 • 08:00 AM GMT
Wed Dec 26 • 08:00 AM GMT
Wed Dec 26 • 08:00 AM GMT
Wed Dec 26 • 08:00 AM GMT
Edit Post
Add Reply