DateAdd Function
Syntax
DateAdd(interval, number, dateexpr)
Group
Description
Returns a Date value a number of intervals from another date.
Parameters
| Parameters | Description |
|---|---|
| interval | Indicates which kind of interval to add. |
| number | Add this many intervals. Use a negative value to get an earlier date. |
| dateexpr | Calculate the new date relative to this date value. If this value is Null, Null is returned. |
| Interval | Description |
|---|---|
| yyyy | Year |
| q | Quarter |
| m | Month |
| y | Day of year |
| d | Day |
| w | Weekday |
| ww | Week |
| h | Hour |
| n | Minute |
| q | Second |
See also
Sub Main Debug.Print DateAdd("yyyy",1,#1/1/2000#) '1/1/2001 End Sub