Working with xsd:duration in TIBCO BusinessWorks

For a project I had to add a Duration to a dateTime. XPath has some functions to get data out of the duration. Unfortunately, these functions are not implemented in TIBCO BusinessWorks. However, there is a way to use these functions. They show up as an error but they are working fine.

As an example I try to add duration “P1DT2H3M4S”, which means 1 day plus 2 hours, 3 minutes and 4 seconds, to the current dateTime. In this case the mapping wil be:

Duration-Mapping

The Validator from BusinessWorks thinks there is an Expression Error: No such function.

Running this mapping in Designer gives this result:

Duration-Result

These functions also work when deployed in TIBCO Administrator.