Date formatting to string

What is the problem? Please be detailed.

I want to calculate age from "birthdate". And for that, I just subtract the "birthdate" from "today" by a calculation name "age". And then find the age in days at another note type question "age_res" with a number like 768 or 1438. But, when, I'm going to use the number for skipping any question as "if(${age}<=1824, 1, 0)", it's not working.

Can anyone help me with the problem?

I want the age in days

Hi @Likhon,

Can you attach the form (excel format) with issues.

Hi @Likhon,

If I've understood your question, in the new question you want to ask, you need to put a formula in the "relevant" column in XLSForm.

so if you only want a question to be asked if age is less than or equal to 1824 days, then the formula in the relevant column should be:
${age}<=1824

That should work, but let me know if there's a problem!
Janna

1 Like

Sorry, I was out of network for few days. But thank you all for your support.
Therefore, I have found the solution.
The age response which I calculate from the birth date was in a repeat group. But now, I calculate the ages of all respondent and use this as a relevant like ${age}<=1824