 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP 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
What MySQL returns if we include date components along with time component as an argument to TIMEDIFF() function?
MySQL would return the output in time value after converting the difference between date-and-time values being provided to TIMEDIFF() function as arguments.
Example
mysql> Select TIMEDIFF('2017-10-22 04:05:45', '2017-10-21 03:04:44')AS 'Difference in Time'; +--------------------+ | Difference in Time | +--------------------+ | 25:01:01           | +--------------------+ 1 row in set (0.00 sec) Here in this example, we can see that MySQL converts the difference in date-and-time values into time values and return the output in time value as well.
Advertisements
 