Dear Sirs et Madames,
I am trying to calculate a survey participants age through his/her
given date of birth. I have attempted to do this as follows:
<bind nodeset="dob" required="true()"
constraint=". <= today()" type="date"/>
<bind nodeset="age" required="true()" type="int" calculate="today()
-
../dob" />
...
...<trigger ref="/sero-survey1/ageConfirmation"> <label>Acknowledge that participant is <output
value="/sero-survey1/age"/> years old and is ?
...
...
However with a dob of Nov 4th 2004, this gives me an unrealistic age
of 2556. Could anyone tell me where I have gone wrong or how to
calculate age from dob in an XPath expression?
Thanks in advance,
Tumaini