- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can we calculate the difference between two time values in MySQL?
With the help of TIMEDIFF() MySQL function the difference between two-time values can be calculated.
Example
mysql> Select TIMEDIFF('04:05:45','03:05:45') AS ‘Difference in Time’; +---------------------------------+ | Difference in Time | +---------------------------------+ | 01:00:00 | +---------------------------------+ 1 row in set (0.00 sec)
- Related Articles
- How to calculate the difference between time in different MySQL columns?
- C Program to calculate the difference between two time periods
- C++ Program to Calculate Difference Between Two Time Period
- Get the time difference between values in different columns with MySQL
- How can we convert TIME and DATETIME values to numeric form in MySQL?
- Find the difference between two datetime values with MySQL?
- How can we calculate the Date in MySQL using functions?
- With the help of function, how can we return the difference in Year, Month and Days between two date values?
- How to calculate the difference between two dates in JavaScript?
- How can I calculate full 24hour days between two specified dates in MySQL?
- How can we offload the time/date handling in MySQL?
- How can we combine the values of two or more columns of MySQL table?
- How can we update any value in MySQL view as we can update the values in MySQL table?
- How can we use MySQL SUM() function to calculate the sum of only dissimilar values of the column?
- How can we create MySQL stored procedure to calculate the factorial?

Advertisements