In this tutorial, you will learn how to get the difference between two date timestamps in MySQL. By using TIMESTAMPDIFF() function you will get the date difference of timestamp dates in MySQL.

Below example demonstrates this:

Example:

SELECT TIMESTAMPDIFF(SECOND,'2019-12-20 10:02:00','2019-12-20 12:01:01'); 

Output:

7141

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