Calculate months automatically from days field

Please, I need help to configure a calculated field that returns the number of months from the days field, including 0 if it is less than 30 days.

thanks for advance for giving me support

This is a form built from scratch

annex print screen highlighted in yellow where this action should work.

@Savechilds, why not try dividing the days by 30 to get months.

I’m sorry but I already tried it and it didn’t work

@Savechilds, 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:

Reference XLSForm:

Calculate Months.xlsx (10.4 KB)

tank you for that, this survey element is very important.

1 Like