Calculating with Date and Time
Because Excel records dates as serial date values, you can use dates in formulas and functions as you would any other value. Suppose you want to find the date that falls exactly 200 days after July 4, 2004. If cell A1 contains the entry 7/4/04, you can use the following formula to compute the date 200 days later, which is 1/20/05 (or 38,372): =A1+200.
As another example, suppose you want to find the number of weeks between October 31, 2003, and May 13, 2004. Use the formula =(("5/13/04")-("10/31/03"))/7, which returns approximately 27.9 weeks.
You can also use times in formulas and functions; however, the results of time arithmetic are not as easy to understand as the results of date arithmetic. For example, you can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access