Hi Vijay,
Strange: if I go to the
XPath sandbox:
- As input, I put:
<gaga>201705202017052020170520</gaga>
- As XPath, I put:
for $d in
/gaga
return concat(
substring($d, 1, 4), '-',
substring($d, 5, 2), '-',
substring($d, 7, 2)
)
- Then as output I get the expected result of `2017-05-20`.
I am thinking that the version of Orbeon Forms you're using might not support `for` in XPath. In case, try the following:
concat(
substring(substring(instance('admission')/admission_date/date, 1, 4), '-',
substring(substring(instance('admission')/admission_date/date, 5, 2), '-',
substring(substring(instance('admission')/admission_date/date, 7, 2)
)
You'll let us know if this help!
Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet