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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

czajw
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  

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/8499413f-9b9b-40c9-a6fe-41aff5dca322n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

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

Alessandro  Vernet
Administrator
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/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1611002246006-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

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

czajw
Alex, 

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

Vlad

pon., 18 sty 2021, 21:37 użytkownik Alessandro Vernet <[hidden email]> napisał:
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/

--
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 [hidden email].
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

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CAH1WSR7UEBh_q%3DxxA4FTyTBOnMgBJ%2BSWPmp2cWBrekxFF88SwA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

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

Alessandro  Vernet
Administrator
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.

-Alex

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

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1611085454949-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet