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 ...

Get Microsoft® Office Excel 2003 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.