GoMonth Function (Date, Long)
|
|
返回指定日期或日期/时间表达式之前或之后指定月份数的日期。
命名空间:
XSharp.VFP
程序集:
XSharp.VFP (在 XSharp.VFP.dll 中) 版本:2.24 GA
Syntax FUNCTION GoMonth(
dExpression AS DATE,
iNumberOfMonths AS LONG
) AS DATE
public static Date GoMonth(
Date dExpression,
int iNumberOfMonths
)
Request Example
查看代码Parameters
- dExpression
- 类型:Date
指定日期表达式。相对于此日期,gomonth( ) 函数返回日期。
- iNumberOfMonths
- 类型:Long
指定从日期或日期/时间开始的月份数。
如果 nNumberOfMonths 为正,GoMonth( ) 返回日期或日期/时间之后 nNumberOfMonths 个月的日期。
如果 nNumberOfMonths 为负,GoMonth( ) 返回日期或日期/时间之前 nNumberOfMonths 个月的日期。
例如,-1 表示 -31 天。
Return Value
类型:
Date
日期
备注
GoMonth( ) 不支持早于 1753 年的日期。
Examples1Set 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