/ comp / gb.vb / vb / dateadd
Vb.DateAdd (gb.vb)
Syntax

    STATIC FUNCTION DateAdd ( period AS String, interval AS Integer, Date AS Date ) AS Date

Returns a Date to which a specified time interval has been added.

Interval is a string expression that is the interval of time you want to add.

Interval | Description
--- | ---
`yyyy` | Year
`q` | Quarter
`m` | Month
`y` | Day of year
`d` | Day
`w` | Week day - Note: A week day is Monday to Friday in Gambas. This is different to VB in which w = d
`ww` | Week
`h` | Hour
`n` | Minute
`s` | Second

Period is the number of intervals you want to add. It can be positive (to get dates in the future) or negative (to get dates in the past).

Date is a Date or literal representing date to which the interval is added.