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, 2910🔥, 0💬
Popular Posts:
How to put statements into a statement block in SQL Server Transact-SQL? You can put statements into...
How To Convert Numeric Expression Data Types using the CONVERT() Function in SQL Server Transact-SQL...
How to download and install Microsoft SQL Server Management Studio Express in SQL Server? Microsoft ...
What are single-byte character string data types supported in SQL Server Transact-SQL? Single-byte c...
How To Install PHP on Windows in MySQL? The best way to download and install PHP on Windows systems ...