DateAdd - function of language VBScript

Returns a date to which a specified time interval has been added.
DateAdd(interval As Variant, number As Variant, date As Variant) As Date
d = DateAdd(interval, number, date)
interval(Variant) String expression that is the interval you want to add:
yyyy - year
q - Quarter
m - month
y - day of year
d - day
w - day of the week
ww - week of year
h - hour
n - minute
s - second
number(Variant) Numeric expression that is the number of interval you want to add. The numeric expression can either be positive, for dates in the future, or negative, for dates in the past.
date(Variant) Variant or literal representing the date to which interval is added.

You can use the DateAdd function to add or subtract a specified time interval from a date. For example, you can use DateAdd to calculate a date 30 days from today or a time 45 minutes from now. To add days to date, you can use day of year ("y"), day ("d"), or day of the week ("w").

If the computed date is before year 100, then it generates an error.

The Example adds one month to January 31 2019:
Dim NewDate
NewDate = DateAdd ("m", 1, "31-Jan-2019")
In this case, function returns 28-Feb-2019, not 31-Feb-2019. If date is 31-Jan-2020, it returns 29-Feb-2020 because 2020 is a leap year.
PROMOTIC 8.3.23 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice