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, 3332🔥, 0💬
Popular Posts:
How To Start the Command-Line SQL*Plus in Oracle? If you Oracle server or client installed on your w...
What Are Bitwise Operations in SQL Server Transact-SQL? Bitwise operations are binary operations per...
How To Verify Your PHP Installation in MySQL? PHP provides two execution interfaces: Command Line In...
What Are the Differences between BINARY and VARBINARY in MySQL? Both BINARY and VARBINARY are both b...
What Is the Difference Between GETDATE() and GETUTCDATE() in SQL Server Transact-SQL? The difference...