When it comes to number manipulation in Excel, loads of folks know their way around that. Where things get weird in Excel is you’re trying to adjust, add, subtract, or pull data from dates. Here’s how you can start diving into works with Dates in Excel.
Difference (Subtraction) of Dates
To subtract one date from another and get the difference in days, this one’s pretty easy: just subtract it like you would any other number:
You’ll notice that you can get negative results on this, too, if you’re subtracting newer dates from older dates.
To Subtract a date from the current date, you’d use the TODAY() function and subtract things:
That will give you the result in days between today and the date in the cell. But what if you wanted to get the difference between two dates in weeks or months or even years? You can use the TODAY() function and do a bit of math, or you can use the DATEDIF function (because like everything in Excel, there are always a few different ways to accomplish something). You can actually use the DATEDIF function to calculate the above examples, too, but here you’ll need to do (and you can format the results columns to get you more decimal points if needed):
Adding Days to a Date
Like above, if you just need to add days to a date, you can do that with the simple Date+Days reference. You can also use the TODAY() function to add days today’s date as well (today is 10/24/22 as I’m writing this, for example):
If you’re looking to add or subtract months from a date in a cell, that gets a bit you’ll need to use the EDATE function for that:
If you want to subtract or add a combination of days, months, and/or years from a date, that gets weird. Microsoft has a great support article to explain how to accomplish that.
Extract a Month or Year from a Date
If you need to pull the day, month or year from a date, that’s pretty straightforward:
If you want to go into more advanced date and time manipulation, AbleBits has a great tutorial on this sort of thing, as well as explaining why you’d use one formula or function over another.
Leave a Reply