Calculate difference between today and pulldata date

I um unable to calculate days between two dates.I have also try to change format of date but not get the result. Please check this in below syntax.

date q2 Today date is ${today} false today()
calculate t1 false format-date (${q2}, '%Y/%n/%e %H:%M')
calculate q3 false pulldata('followup', 'fetchdate', 'elder_id_key', ${elder_id})
calculate t2 false format-date (${q3}, '%Y/%n/%e %H:%M')
calculate q4 false ${t1}-${t2}
note check_q4 check:${q4} false
text q5 check diff false int(${q4})

Hi @Ravinder_Singh

You question is not clear, community members will be in a better position to help if you clarify what you are trying to achieve. Please use the below template for your post:

What is the problem? Please be detailed.

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.

We would like to learn more about yourself, what you do, your interests, projects you are working on … please introduce yourself. Whilst you are it, please add a profile picture.

I have moved your post to the Support Category and have added a few tags to make it easier for other members to find it .

2 Likes

Example
int(today()-${date.birth})