Transform DateTime Stage
The Transform DateTime stage allows date/time values in a message to be converted to a different time zone or date format.
Stage Overview
The Transform DateTime stage allows either an empty object, or an object filled with attributes containing date/time values to be converted to a different time zone and/or date format.
Stage Definition File Location
All Transform DateTime stages are defined by creating an appropriately formatted JSON definition file in the following location:
Stage JSON Definition File Format
The JSON definition file for a Transform DateTime stage is as follows:
{
"name": "stage-name",
"displayName": "Brief Stage Title",
"description": "Brief description of the stage.",
"enabled": "$env:STATUS_<INTEGRATION_NAME>",
"source": "source-event",
"concurrency": 10,
"inputTimeZone": "New Zealand Standard Time",
"outputTimeZone": "AUS Eastern Standard Time",
"timestampFormat": "Optional date/time format to use when converting"
}
| Property | Description |
|---|---|
name | The name of the stage. |
displayName | Optional (but highly recommended). A short (3 or 4 word) "display name" for the stage, used as a "title" of the stage in the Integration Hub Portal service's self-documentation capability. |
description | Optional (but highly recommended). A brief (10 to 15 word) description of the stage, used as a brief description of the stage's purpose in the Integration Hub Portal service's self-documentation capability. For a more detailed explanation (when needed), use the stage markdown feature. |
enabled | Optional boolean flag (true or false). Default is true.Generally set via a DevOps variable. Controls if the stage is deployed enabled or not. |
source | The source event that the stage subscribes to. See Pub/Sub Model. Alternatively, sources may be supplied, and an array of one or more source events can be subscribed to. |
concurrency | Optional number of concurrent runs permitted for the stage. Default is 10. |
inputTimeZone | Supplied payload date/time values are in this time zone. |
outputTimeZone | Output payload date/time values will be converted to this time zone. |
timestampFormat | This is the date/time format that the converted times will be output in. By default the format will be "YYYY-MM-DD HH:MM:SS", but other formatting options are available. |
Tips and Tricks
Only payloads with attributes containing date/time values can be sent to this stage. If a "currentDateTime" attribute does not exist in the incoming payload (including if the payload is empty) then this attribute will be added to the output payload from the stage.
Last updated on