Works: Formula to Add Days to a Date in the Spreadsheet (61783)



The information in this article applies to:

  • Microsoft Works for MS-DOS
  • Microsoft Works 2.0
  • Microsoft Works 3.0
  • Microsoft Works 4.0a
  • Microsoft Works 4.5a
  • Microsoft Works for Windows 95, version 4.0

This article was previously published under Q61783

SUMMARY

To add (or subtract) a certain number of years, months, and/or days to a date in a Works spreadsheet, use the following formula:
   =Date(Year(ref)+years,Month(ref)+months,Day(ref)+days)
				

MORE INFORMATION

In the above formula, "years," "months," and "days" are integers and "(ref)" is a spreadsheet cell reference.

For example, if cell A1 contains the date 1/1/89, use the following formula to find the date three years, one month, and five days later.
   =Date(Year(A1)+3,Month(A1)+1,Day(A1)+5)
				
The result of this formula is the serial number 33640. It displays as "February 6, 1992" when Cell Attributes in the Format menu is set to display Date Long.

NOTE: The above procedure is a correction to the steps in the "One-to- One with Microsoft" publication, Issue 10, Page 7.

Modification Type:MajorLast Reviewed:5/13/2003
Keywords:KB61783