Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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)Advertisements