Excel subtracting dates
Excel offers a variety of functions that allow you to subtract dates. When deciding which one to use you should first know what result you want and what you want to do with that result.
Let’s use a fun example.
Let’s say you wanted to find out how old you were in days. This can be done by subtracting your date of birth from today’s date and displaying the result in “Days”.
In our opinion, the best function to use in this case is DATEDIF.
The syntax for DATEDIF is:
= DATEDIF (Date of birth, Today’s Date, Unit of result)
= DATEDIF (04/07/1961, 04/04/2011, “D”)
Where “D” is the unit for days.
Let’s see a live example
You’ll see that we have used “today()” instead of manual setting today’s date. This way the calculation will always use the system date.
If you’d like to display the result in something other than days, simply change the “Unit” to one of the following.
D = Days
M = Months
Y = Years