Collections:
Calculating the Difference between Two Time Values in MySQL
How To Calculate the Difference between Two Time Values in MySQL?
✍: FYIcenter.com
If you have two time values, and you want to know the time difference between them, you can use the TIMEDIFF(time1, time2) function as shown below:
SELECT TIMEDIFF(TIME('19:26:50'), TIME('09:26:50'))
FROM DUAL;
10:00:00
SELECT TIMEDIFF('1997-03-01 19:26:50.000123',
'1997-02-28 09:26:50.000000') FROM DUAL;
34:00:00.000123
⇒ Presenting a Past Time in Hours, Minutes and Seconds in MySQL
⇐ Calculating the Difference between Two Dates in MySQL
2017-12-26, 3756🔥, 0💬
Popular Posts:
What Is an Oracle Tablespace in Oracle? An Oracle tablespace is a big unit of logical storage in an ...
How To Change the Password for Your Own User Account in MySQL? If you want to change the password of...
How to connect SQL Server Management Studio Express to SQL Server 2005 Express in SQL Server? Once y...
How to set the current database in SQL Server? Once you are connected to the SQL Server, you should ...
How To Update Multiple Rows with One UPDATE Statement in SQL Server? If the WHERE clause in an UPDAT...