XL.DateAdd function: add years, months, days, hours, minutes to a date.

How to use DateAdd function for Excel: formula and results
XL.DateAdd function – Date and time function type – returns a date value which is a result of adding a specified time interval to a specified date.
The function helps you easily add years, quarters, months, days, minutes, hours and seconds to a date.

Before you begin, add Functions to Excel

Functions are one of the 20+ features within XLTools Add-in for Excel. Works in Excel 2024, 2019, 2016, 2013, 2010, and Microsoft 365.
Get started with XLTools ribbon
– free trial gives you 14 days of full access to all features.

Syntax

=XL.DateAdd(datepart, number, date)
ArgumentDescription
datepart [required]Text expression representing the time interval you want to add: Year, Quarter, Month, Hour, Minute, Second
number [required]Number of intervals you want to add
date [required]An expression representing the date and time to which the interval should be added

Examples [download]

Download this spreadsheet with examples and try the function yourself.
FormulaDescription
=XL.DateAdd("Year", 2, TODAY())
Returns the date which is today + 2 years
=XL.DateAdd("Quarter", 2, TODAY())
Returns the date which is today + 2 quarters
=XL.DateAdd("Month", 2, TODAY())
Returns the date which is today + 2 months
=XL.DateAdd("Hour", 2, NOW())
Returns the date and time which is now + 2 hours
=XL.DateAdd("Minute", 120, NOW())
Returns the date and time which is now + 120 minutes
=XL.DateAdd("Second", 120, NOW())
Returns the date and time which is now + 120 seconds
=XL.DateAdd("Day", 20, A8)
Returns the date which is the date in cell A8 + 20 days
Explore other functions
Any questions or suggestions?
close window
How can we help?