How To Calculate the Difference between Two Dates?
Submitted by: AdministratorIf 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
Submitted by: Administrator
SELECT DATEDIFF(DATE('1997-02-28'), DATE('1997-03-01'))
FROM DUAL;
-1
Submitted by: Administrator
Read Online MySQL Programming Job Interview Questions And Answers
Top MySQL Programming Questions
☺ | How To Use Regular Expression in Pattern Match Conditions? |
☺ | What Is TIMESTAMP in MySQL? |
☺ | What Is MySQL? |
☺ | How To Use CASE Expression? |
☺ | How To Decrement Dates by 1 in MySQL? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Sybase Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |