Collections:
Calculating the Difference between Two Dates in MySQL
How To Calculate the Difference between Two Dates in MySQL?
✍: FYIcenter.com
If you have two dates, and you want to know how many days between them, you can use the DATEDIFF(date1, date2) function as shown below:
SELECT DATEDIFF(DATE('1997-02-28'), DATE('1997-03-01'))
FROM DUAL;
-1
⇒ Calculating the Difference between Two Time Values in MySQL
⇐ Decrementing a Date by 1 in MySQL
2017-12-26, 2895🔥, 0💬
Popular Posts:
How To Insert New Line Characters into Strings in SQL Server Transact-SQL? If you want to break a st...
How Fixed Length Strings Are Truncated and Padded in SQL Server Transact-SQL? When the length of the...
How To Divide Query Output into Multiple Groups with the GROUP BY Clause in SQL Server? Sometimes, y...
What is sqlservr.exe - Process - SQL Server (SQLEX?PRESS) in SQL Server? Process sqlservr.exe is the...
What is test testing area for? The testing area is provided to allow visitors to post testing commen...