DateAdd() Function
This function returns a date value based on adding an interval of time. It will be more clear by going through the following examples.

Syntax :

DateAdd ( interval , number, date )

Interval :
This is a required argument. This is a string expression which specify the interval type but not the quantity. For example, Minute, second, hour, day etc. Below table has all the possible Interval types.

This is a required argument. This is the number of interval we want to add in the date time. This can be positive or negative. For future dates, positive and for past dates, negative values.

This is a required argument. This is date in which you want to add that interval.


Interval Description
yyyy Year
q Quarter
m Month
y Day of year (same as Day)
d Day
w Weekday (same as Day)
ww Week
h Hour
n Minute
s Second


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 2 Months from today or a time 30 minutes from now.

The DateAdd function won’t return an invalid date. The following example adds one month to January 31:

NewDate = DateAdd(“d”, 1, “01-Jan-95”)

In this case, DateAdd returns 02-Jan-95.


Join over 10, 000+ Excel VBA Enthusiasts & get this FREE e-Book Now!