Microsoft KB Archive/84721

{| = WD: Adding and Subtracting Days from a WinWord DATE Field =
 * width="100%"|

Last reviewed: February 2, 1998

Article ID: Q84721 The information in this article applies to:
 * Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
 * Microsoft Word for Windows 95, versions 7.0, 7.0a
 * Microsoft Word 97 for Windows
 * Microsoft Word for Windows NT, version 6.0
 * Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
 * Microsoft Word 98 Macintosh Edition

SUMMARY
In Microsoft Word, you can nest an expression field in a DATE field to add or subtract days, months, or years from the current date. Word adds or subtracts a specific number from the current month, day, or year if you include an expression field as part of the DATE field's date picture format.

MORE INFORMATION
The following chart shows the field syntax to use for various functions. Replace the letter &quot;n&quot; with the number to be added or subtracted from the date.

Function        Format         Field Syntax Adding days     M/d/YY         {DATE \@ &quot;M/{={DATE \@ d}+n}/yy&quot;} MMMM d, YYYY  {DATE \@ &quot;MMMM {= {DATE \@ d}+n}, YYYY&quot;} d MMMM, yyyy  {DATE \@ &quot;{={DATE \@ d}+n} MMMM, yyyy&quot;} d-MMM-yy      {DATE \@ &quot;{={DATE \@ d}+n}-MMM-yy&quot;} Subtracting     M/d/yy         {DATE \@ &quot;M/{={DATE \@ d}-n}/yy&quot;} days Adding Months   M/d/yy         {DATE \@ &quot;{={DATE \@ M}+n}/d/yy&quot;} Subtracting     M/d/yy         {DATE \@ &quot;{={DATE \@ M}-n}/d/yy&quot;} Months Adding Years    M/d/yy         {DATE \@ &quot;M/d/{={DATE \@ yy}+n}&quot;} Subtracting     M/d/yy         {DATE \@ &quot;M/d/{={DATE \@ yy}-n}&quot;} Years