How to Add Years to a Date ExpressionID: Q128069 The information in this article applies to:
Use the fuction GOMONTH() to add years to a date expression. GOMONTH() returns the date that is a specified number of months before or after a given date or datetime expression. Here's the syntax:
The <expd> specifies a date expression for which GOMONTH() returns the
date. The <expN> specifies the number of months from the date or datetime.
If <expN> is positive, GOMONTH() returns a date that is <expN> months after the date. If nNumberOfMonths is negative, GOMONTH() returns a date that is <expN> months before the date. For example, if you have a date expression in a variable like this:
And you want to add a number of years to that date, as shown here:
You could use the GOMONTH() function as in this example:
Additional reference words: FoxWin 2.60a
KBCategory: kbprg
KBSubcategory: FxprgGeneral
|
|
Last Reviewed: June 27, 1995 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |