Microsoft KB Archive/77000

= Works: Adding or Subtracting Days in Spreadsheet or Database =

Article ID: 77000

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft Works 2.0 Standard Edition
 * Microsoft Works 2.0a
 * Microsoft Works 3.0 Standard Edition
 * Microsoft Works 3.0a
 * Microsoft Works 3.0b
 * Microsoft Works 4.5 Standard Edition
 * Microsoft Works 4.5a
 * Microsoft Works 4.0 Standard Edition
 * Microsoft Works 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 &quot;ref&quot; 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.

Additional query words: 2.00 2.00a 3.00 3.00a 3.00b 4.00 4.00a 4.50 4.50a

Keywords: kbinfo KB77000

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.