dateAdd
Adds the specified units of duration to the given date.
dateAdd(date, duration, unit)
#
Parametersdate
: A date in ISO-8601 format such as2021-06-12T11:03:49.701Z
provided asstring
duration
: A duration constantunit
: Anumber
unit
#
Returns- A new date with the specified duration units added
#
DurationZWL provides values of duration as constants in form of a read-only map
. When you type duration
in editor, available constants are auto-completed.
#
ExampledateAdd(timestamp(), duration.days, 7) # Adds 7 days to current date
dateAdd(timestamp(), duration.months, 1) # Adds 1 month to current date