DATEADD
Creates a new date by adding an offset to a specified date.
Syntax
=DATEADD(interval, count, date)
Arguments
Argument | Type | Description |
---|---|---|
interval | String | The type of interval to find the difference of Valid intervals are: - YEARS - YEAR - QUARTERS - QUARTER - MONTHS - MONTH - WEEKS - WEEK - DAYS - DAY - HOURS - HOUR - MINUTES - MINUTE - SECONDS - SECOND - MILLISECONDS - MILLISECOND |
count | Number | The number of intervals to add to the specified date |
date | Date | The date to add intervals to |
Examples
=DATEADD("YEAR", 1, DATE(2019, 01, 01))
→Jan 1, 2020 12:00 AM
Adds one year to the date Jan 1, 2019 12:00 AM
=DATEADD("MONTHS", 3, DATE(2019, 01, 01))
→Apr 1, 2019 12:00 AM
Adds three months to the date Jan 1, 2019 12:00 AM
Updated 10 months ago