Date formatter is used to change the message date and/or time to another format required by the target system.
Using the date formatter in a routing rule
1. Edit or create a new routing rule.
2. Go to Mappings > Outbound mappings > Add single mapping > Click "Add" and select "Date" from the dropdown menu.
The date formatter changes the date format for a given date string. If an attribute is marked as the date in ONEiO's internal schema for some system, then the date string is always already in ISO 8601 format. Otherwise, the date string could be taken from some other field, for example with a Regular expression formatter and it could be in some other date format.
- fromFormat specifies initial format of the date. Should be valid date format. The default date format is ISO 8601.
- fromTimeZone specifies the timezone that the given date is in. If not present, defaults to UTC
- toFormat specifies destination format of the date. Also, should be a valid date format and is required.
- toTimeZone specified the timezone that the destination attribute should be in. If not present, defaults to UTC.
You can add relevant information to the date format by using symbols. For example, the time zone offset or the day of the week.
A list of symbols that can be used in date formatter can be found here.
Testing date formatter
You can test the date formatter by clicking "Test" and providing a test string.
Changing date format
You can change the date format for example from mm/dd/yyyy to dd/mm/yyyy and see how it works in a test formatter.
Changing time based on time zones
Select the source time zone and the target time zone and the time will be converted to target time zone's time.
Links to more information about date formats: