Monday, November 17, 2008

Calculate the Difference between Two Dates

Use the DATEDIFF(date1, date2) function as shown below if you want to calculate the diffrence between 2 dates:


SELECT DATEDIFF(DATE('1997-02-28'), DATE('1997-03-01'))
FROM DUAL;
-1