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, 2976🔥, 0💬
Popular Posts:
What Are Date and Time Functions in MySQL? MySQL offers a number of functions for date and time valu...
Where to find answers to frequently asked questions I am new to Oracle database. Here is a list of f...
How To Change the Password for Your Own User Account in MySQL? If you want to change the password of...
How to run Queries with SQL Server Management Studio Express in SQL Server? 1. Launch and connect SQ...
What Are Out-of-Range Errors with DATETIME values in SQL Server Transact-SQL? When you enter DATETIM...