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