Returns the current datetime including an offset. If a time zone id is specified, the time zone offset will be applied. For more information on data types, refer to this page.
Date
nowWithDelta(<parameters>)
Parameter | Description |
---|---|
delta | positive or negative integer value |
date part | years, months, days, hours, minutes or seconds as a string |
time zone id | string representation of the time zone value. For more, see Data types. Time zone id must be a string constant. It cannot be a field reference nor an expression. |
nowWithDelta(<delta>,<date part>
nowWithDelta(<delta>,<date part>,"<timeZone id>")
Returns a dateTime.
nowWithDelta(-2, "hours")
nowWithDelta(-2, "hours", "Europe/Paris")
Returns a dateTime exactly 2 hours ago.