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, 2010. If cell A1 contains the entry 7/4/10, you can type the following formula to compute the date 200 days later: =A1+200, which results in 1/20/11 (or the serial date 40563).

As another example, suppose you want to find the number of weeks between October 31, 2003, and May 13, 2011. Type the formula =((“5/13/11”)–(“10/31/03”))/7, which returns 393 weeks.

You can also use times in formulas and functions, but, the results of time arithmetic are not as easy to understand as the results of date arithmetic. For example, ...

Get Microsoft® Excel® 2010 Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.