If you subtract a number from a date, you get a new date. Soo if cell A1 contains 2009/04/21 (April 21) =A1-5 gives 2009/04/16. Compare that with the other date.
In the same way, you can subtract dates. If A1 contains 2009/04/21 and B1 contains 2009/04/11 the formula =A1-B1 results in 10. Compare that with 5.

Does this help?

Kees