How to check the age and date of birth?

Hello dear friends,

I am doing a questionnaire in kobotoolbox and I am having difficulty controlling the age with the date of birth. I would like to ask you to help me.
Thank you

@allmylife017, could you tell us more on how you wish to control the age?

@Kal_Lam : I would like if I type the age and after I type the date of birth, that the system checks the age that I have typed by calculating the age against the current date and the date of birth that I have type. Thanks

1 Like

@allmylife017, you could do it as outlined in the image shared below:

In the survey tab of your xlsform:

Data entry screen as seen in Enketo: when a wrong age is entered

Data entry screen as seen in Enketo: when a correct age is entered

Reference xlsform:

Calculate Age.xlsx (9.7 KB)

@Kal_Lam ; You are very very very excellent. Thanks a lot
God richly bless you

1 Like

@Kal_Lam : Please, if I want to type the age first and then type the date of birth. How can I do it?

@allmylife017, you could do this too as outlined in the image shared below:

In the survey tab of your xlsform:

Data entry screen as seen in Enketo: when a wrong entry is made

Data entry screen as seen in Enketo: when a correct entry is made

Reference xlsform:

Calculate Age (V1).xlsx (10.3 KB)

1 Like

@Kal_Lam : Thanks you a lot. You are so good.

1 Like