Works: Adding or Subtracting Days in Spreadsheet or Database (77000)



The information in this article applies to:

  • Microsoft Works 2.0
  • Microsoft Works 2.0a
  • Microsoft Works 3.0
  • Microsoft Works 3.0a
  • Microsoft Works 3.0b
  • Microsoft Works 4.5
  • Microsoft Works 4.5a
  • Microsoft Works for Windows 95, version 4.0
  • Microsoft Works for Windows 95, version 4.0 4.0a

This article was previously published under Q77000

SUMMARY

In Microsoft Works, the following formula can be used to add or subtract a certain number of years, months, and/or days to a date in a Database or Spreadsheet.

NOTE: In the formulas below, years, months, and days are integers, and "ref" is a spreadsheet cell reference or database field name.

=Date(Year(ref)+years,Month(ref)+months,Day(ref)+days)

To simplify the formula for use with days only, use the following:

=ref+days

MORE INFORMATION

For example, if cell A1 contains the date 1/1/89, use the following formula to find the date 3 years, 1 month, and 5 days later:

=Date(Year(A1)+3,Month(A1)+1,Day(A1)+5)

To find the date 60 days later, use the following formula:

=A1+60

The result of each of these formulas is a serial number, for example, 33640 for the first formula. To show it as a date, select the cell or field containing the formula, and format it in the desired date format.

For more information about this topic, see your Works printed documentation or online help.

Modification Type:MajorLast Reviewed:11/15/2004
Keywords:kbinfo KB77000