Describe the Bug
I currently face the problem that i can not use the date type for my person-create.xlsx form, since setting the constraint does not work properly.
No matter, what i try, i still get the error, that my date cannot be in the future
I can deploy the default app and get following error, even though the default app has a work-around with the date formatting:
I have another question concerning calculating the age:
If i try to get the age by having:
type name
date dob1
and then calculate age_in_year with int((today()-${dob1}) div 365.25,0) as it is suggested in Calculate Age in ODK - Support - ODK Forum i get some very strange results like the number 4009654881
format-date(today(), ‘%Y’) - format-date(${dob1}, ‘%Y’) would work, but gives me in general the wrong age.
How would i calculate the age?
Well, both today() and dob1 seem to be be timestamps, numbers of milliseconds since the Unix Epoch. Dividing by 365.25 would require you to work with days, not milliseconds, to get correct results.