Verify DOB according to given age and verify age according to given DOB

What is the problem? Please be detailed.
verify age according to given DOB
Q1. DOB
Q2.Age

and another
Verify DOB according to given age
Q1 Age
Q2. DOB

What ODK tool and version are you using? And on what device and operating system version?

What steps can we take to reproduce the problem?

What you have you tried to fix the problem?

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.

Hi @sanish_shrestha

What value do you want to add as an answer for DOB? Only a year or maybe you need a full date? Please describe your case better.

Regards,
Grzegorz

Hi @Grzesiek2010,

when age is entered the date is automatically displayed,

and when full date is entered age is automatically displayed

sanish

so for example:
27 -> 1991
01.01.1991 -> 27
?

Yes @Grzesiek2010,
I want to learn in that form

yes sir my issue also same .you describe very good.How to implement your example on my form or excel sheet xlsx.

Maybe something like this: dates.xlsx (8.7 KB)

Let me know if it's satisfying for you.

Regards,
Grzegorz

i test in kobo toolbox but give error

Loading Error
Error occured during the loading of this form. It is recommended not to use this form for data entry until this is resolved.

Please contact support@kobotoolbox.org with the link to this page and the error message below:

FormLogicError: Could not evaluate: format-date(today(), ‘%Y’) - format-date( /model/instance[1]/data/dob , ‘%Y’), message: The expression is not a legal expression. (line: undefined, character: undefined)

I don't know why it doesn't work in Kobo. Everything is ok in ODK Colllect.

I also tried in Aggregate but doesn't work either.

Do you see the same error?

I tried iploading to Aggregate and works weel form me.

I got "Error: Problem with JavaRosa Parsing Form: org.opendatakit.aggregate.exception.ODKIncompleteSubmissionData: Javarosa failed to construct a FormDef. Is this an XForm definition?" this error

Now i will check and working 100% on this link thanks Grzegorz Orczykowski for help
https://odk.enke.to/preview?form=http://82.196.7.170/downloads/cepwf42m/dates.xml

Just to be sure... did you converted the form I attached to xml?