How calculate the difference in months between two dates in Orbeon?

12 views
Skip to first unread message

Władysław Czaja

unread,
Jan 15, 2021, 5:01:26 PMJan 15
to Orbeon Forms
Here I am trying to calculate the difference in months between two dates, but when  

https://demo.orbeon.com/demo/fr/orbeon/builder/edit/c7053ae8e94c829aaa1794ade5d4b4d2ef3fe9ed

When I try to use a function for the duration calculation I gets P0M  

Alessandro Vernet

unread,
Jan 18, 2021, 3:37:27 PMJan 18
to orb...@googlegroups.com
Hi Władysław,

Good question: and I've linked to Michael Kay's answer below, which explains
why this doesn't come out-of-the-box with XPath.

https://stackoverflow.com/a/31484436/5295

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

Władysław Czaja

unread,
Jan 18, 2021, 3:55:03 PMJan 18
to orb...@googlegroups.com
Alex, 

Is it possible to calculate between two dates in months , but in another way, not using XPath ? Can I use Java script ?

Vlad

--
You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/FQt7zT3z_GM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1611002246006-0.post%40n4.nabble.com.
Władysław Czaja

Alessandro Vernet

unread,
Jan 19, 2021, 2:44:19 PMJan 19
to orb...@googlegroups.com
Hi Vlad,

Formulas in Form Builder use XPath, not JavaScript, so I'm afraid that in
calculated values, or anywhere else you have a formula, you need to use
XPath.
Reply all
Reply to author
Forward
0 new messages