ERR - AddMinutes not working in XPath SimpleDataRule

I have very easy SimpleDataRule where in XPath there is AS:AddMinutes(‘2016-02-01T11:00:00.000’,‘10’) statement. Unfortunately it is not working and I get error message in client when the rule is used.

When I use AS:AddDays() function it works just perfect.

I have tried and tested and it seem that in transformations AddMinutes() works very well. So it seems to be bug.

Any advice how to overcome this?

UPDATE: When I use ComplexDataRule transformation works just fine :smile:

You are right, this function does not work in an XPath scenario.

However you can use a standard EXSLT function date:add.

An example for adding 5 minutes:

date:add(date:date-time(), 'PT5M')`

In the current master version all XSLT functions are available using XPath.

1 Like