当前位置: 首页 > 网络学院 > 客户端脚本教程 > VBScript > VBScript DateAdd 函数
The DateAdd function returns a date to which a specified time interval has been added.
DateAdd函数可以返回已添加指定时间间隔的日期。
DateAdd(interval,number,date) |
参数 | 描述 |
---|---|
interval | Required. The interval you want to add 必须的。你所要加入的间隔类型 Can take the following values:
|
number | Required. The number of interval you want to add. Can either be positive, for dates in the future, or negative, for dates in the past 必须的。你所希望的间隔数值。 |
date | Required. Variant or literal representing the date to which interval is added 必须的。被加上指定时间间隔的日期 |
'Add one month to January 31, 2000 输出: 2/29/2000 |
'Add one month to January 31, 2001 输出: 2/28/2001 |
'Subtract one month from January 31, 2001 输出: 12/31/2000 |
DateAdd
How to use the DateAdd Function add a one month to a date.
使用DateAdd函数给某日期加上一个月
DateAdd
How to use the DateAdd Function subtract a one month to a date.
使用DateAdd函数给某日期减去一个月