Easy Tutorial
❮ Func Isnull Vbscript Tutorial ❯

VBScript DateAdd Function



The DateAdd function returns a date to which a specified time interval has been added.

Syntax

Parameter Description
interval Required. The time interval you want to add. Possible values are: yyyy - Year<br> q - Quarter<br> m - Month<br> y - Day of the year<br> d - Day<br> w - Day of the week<br> ww - Week of the year<br> h - Hour<br> n - Minute<br> s - Second
number Required. The number of time intervals to add. Use positive values for future dates and negative values for past dates.
date Required. A variable or literal representing the date to which the time interval is added.

Example

Example 1

How to use the parameters:

Output of the above example:

Example 2

Subtract one month from January 31, 2001:

Output of the above example:

Example 3

Add one day from the current date:

Output of the above example:


❮ Func Isnull Vbscript Tutorial ❯