How to calculate the no of days between two dates

Hi

All

how to calculate the no of days between two dates like 2011-2-15 to

2011-2-20.

please help me out

Thanks
MD.Samiuddin

This will do what you need

http://snipplr.com/view/2223/get-number-of-days-between-two-dates/


//By executing this query, first parameter is higher date and second is lower date

SELECT DATEDIFF('2006-04-04','2006-04-01');

//it gives '3' as a result