I'm new in ODK and I'm already pleased. I've been looking for an issue and I'm not realy satisfied of what I've found in the forum and elsewhere.
I have three variables date_obs: Date of observation; date_birth: Date of birth and age.
The individuals must have between 2 months and 5 years. When the exact date of birth is unknown, the clerk must mark '09-09-2099' and write the age, in month. I have writen the following on Excel:
date_obs constraint: . <= today()
date_birth constraint: ((. <= ${Q.104} - 60 ) and (.>= ${Q.104} - 1797 )) or (. = '9 sep 2099')
age constraint: (.>=2) and (.<=59)
age relevant: ${Q.113}!='09 sep 2099'
age default: (today() - ${q0113})/30.4375
I tried the date() and decimal-date() functions but these do not work on enketo. What's wrong with my data?
Date_Age.xls.xlsx (10.6 KB)