26.1 The Convert Time Token Displays an Exception

When processing a rule with the Convert Time token in the Delimited Text driver, you may encounter the following exception:

Couldn't convert date/time '<DD> <MM> <YYYY>': java.text.ParseException: Unparseable date: "<DD> <MM> <YYYY>"

This issue occurs when the month <MM> is provided in an alphabetic format, such as 24 Feb 1995. As a result of this exception, the Delimited driver fails to start.

Workaround: The Convert Time token converts date and time from the source format, language, and time zone to the destination format, language, and time zone. The date and time format of src-format in this rule is DD MM YYYY as shown below:

<token-convert-time dest-format="!CTIME" dest-tz="Australia/Victoria" src-format="DD MM YYYY" src-tz="Etc/UCT"><token-op-attr name="terlstduty"/></token-convert-time>

If you use an alphabetic month, you must specify the language by adding the src-lang attribute to the policy.

For example,

token-convert-time(dest-format="!CTIME",dest-tz="Australia/Victoria",src-format="DD MM YYYY",src-lang="en-US",src-tz="Etc/GMT","24 Feb 1995")

Alternatively, you can specify the src-format attribute in the rule using the DD/MM/YYYY format.