I want to calculate the number of days between two dates in the Cubo form. How can I do that?

this the message error

FormLogicError: Could not evaluate: DAYS( /model/instance[1]/data/group_zk1xo67/endDate - /model/instance[1]/data/group_rp88x61/startDate ), message: Function “{}DAYS” does not exist.

Can you paste the formula you used and if possible an XLS version of your form?

1 Like

DAYS( ${endDate},${startDate})

Hi

You should simply use the following

**${endDate}-${startDate}**

instead of

What is the error? Can you share a screenshot and the XLS form?

1 Like

I want to calculate the number of days between two dates in the kobo form. How can I do that?

and I use the last format to find answer but the form appear this error msg

What is the error message you are seeing? Can you send the screenshots?

thank you dear I was used this formula (${msrf_start_date}-${app_end_date})+1

its very nice, I look up in this topics

2 Likes

Thank you Amani, the issue was with the naming of your date questions in the formula. Glad to know this was solved.

1 Like