How to pull the date in ODK collect

Hi,

We have Db of children data, saved in CSV format. While searching the date of birth of the child we got a perfect answer. In this, we have to convert the DOB in months. Pls, suggest to us.

Thank you.

Hi @Manne_Munikumar,
you can use a calculated field to get the DOB in months:

int((today() - ${BIRTHDATE}) div 30.44)

Hi @aurdipas if DOB is not in date format, how to convert in date format ?

int((today() - date(${BIRTHDATE})) div 30.44)

where the date is in is in 'YYYY-MM-DD' format

2 Likes

Thank you @aurdipas for the speedy reply and its working perfectly... :+1:

2 Likes