ADD_DURATION
Add duration to datetime

Description

Returns a new datetime by adding a number of given units to the original datetime, such as 1 day or 7 hours.
Valid units are: years, months, dates, hours, minutes, seconds or milliseconds.

Function signature

1
ADD_DURATION(date: String, duration: Number, units: String = milliseconds) => String
Copied!
Parameter
Description
Date
Date
Duration
Duration to be added to date
Units
Units of duration("years", "months", "weeks", "quarters", "days", "hours", "minutes", "seconds", "milliseconds"). Default is "milliseconds".

Examples

Formula
Return value
ADD_DURATION("2019-07-11T13:06:15+03:00", 0)
2019-07-11T13:06:15+03:00
ADD_DURATION("2019-07-11T13:06:15+03:00", 1, "days")
2019-07-12T13:06:15+03:00
ADD_DURATION("2019-07-11T13:06:15Z", -2, "hours")
2019-07-11T11:06:15Z
Last modified 1yr ago
Export as PDF
Copy link