startTime v openvpms:get(.,"startTime")

I am just wondering why

if I do

date:format(startTime,"dd/MM/yyyy")

it doesnt work...

but

date:format(openvpms:get(."startTime"),"dd/MM/yyyy") 

does

I thought both returned a dateTime object?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: startTime v openvpms:get(.,"startTime")

The former expression won't work as startTime is not known to the xpath expression.

The second expression returns the value of the "startTime" node from the current object, identified by the period. There should be a comma after the period i.e.:

date:format(openvpms:get(.,"startTime"),"dd/MM/yyyy") 

 

Syndicate content