DateTimeConverterValve
Converts a date/time value from one format to another.
Source value supported formats:
- ISO instant: 2020-02-03T10:16:16.441Z
- ISO offset: 2020-02-03T11:30:00.000+01:00
- ISO local time (no timezone, system default is used): 2020-02-03T11:30:00.000
- JDBC timestamp: 2020-02-03 11:30:00
- Custom format specified by property src_format
Output format is by default ISO instant but can be customised using dest_format property.
Conversion can also modify the date/time value using a duration in ISO-8601 duration format PnDTnHnMn.
Properties
Example Configuration
{ "name":"DateTimeConverterValve", "config": {
"src":"{{item.timestamp}}",
"src_format": "yyyy/MM/dd HH.mm.ss",
"dest":"result",
"duration":"-PT2H",
"dest_format":"yyyy-MM-dd HH:mm:ss"
} }