dateAddSubtractInverseFormat
def dateAddSubtractInverseFormat = {dateTimeString, periodString, isAdd = true ->
xxx
}
Adds or subtracts time periods from dateTime and inverse-formats values in yyyy-MM-dd HH:mm:ss format.
Parameter
Description
Default Value
dateTimeString
dateTime string in ISO date-time format.
periodString
The time period to add or subtract.
isAdd
Specifies whether to add or subtract.
true
Example
"StartDateTime": "dateAddSubtractInverseFormat(payload.fields.svmx_start_datetime, payload.fields.svmx_travel_time_to_location, false)",
In this example, if the value of svmx_start_datetime is 2018-07-29T16:22:33.000Z, and the value svmx_travel_time_to_location is PT10S, then the resulting value of StartDateTime is 2018-07-29 16:22:22.
For more information:
escape
ifelse
Was this helpful?