GoMonth Function (Date, Long) | |
Returns the date that is a specified number of months before or after a given Date or Date/Time expression.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax FUNCTION GoMonth(
dExpression AS DATE,
iNumberOfMonths AS LONG
) AS DATE
public static Date GoMonth(
Date dExpression,
int iNumberOfMonths
)
Request Example
View SourceParameters
- dExpression
- Type: Date
Specifies a date expression for which GoMonth( ) returns the date.
- iNumberOfMonths
- Type: Long
Specifies the number of months from the date or date/time. If nNumberOfMonths is positive,
GoMonth( ) returns a date that is nNumberOfMonths months after the date or date/time.
If nNumberOfMonths is negative, GoMonth( ) returns a date that is nNumberOfMonths months before the date or date/time.
For example, -1 means -31 days.
Return Value
Type:
Date
Date
Remarks
GoMonth( ) does not support dates earlier than 1753.
Examples 1Set CENTURY ON
2gdDeadLine = GoMonth({^1998-02-16}, 5)
3Clear
4? gdDeadLine
5? GoMonth({^1998-12-31}, 2)
6? GoMonth({^1998-12-31}, -2)
See Also