Date formatter is used to change the message date and/or time to another format required by the target system.
Using 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.
Date formatter changes date format for given date string. If an attribute is marked as 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. If not present, 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.
List of symbols that can be used in date formatter can be found here.
Testing date formatter
You can test date formatter by clicking "Test" and providing a test string.
Changing date format
You can change date format for example from mm/dd/yyyy to dd/mm/yyyy and see how it works in 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: