Date need to plus by 30 days

To automatically set a follow-up date 30 days after entering today's date into the "Enrolled Date" variable in ODK xls, need to add 30 days plus in the "Follow Up" variable field.

Example: if today is 01 mar, 2024, i need 30 mar, 2024

You can try for a date type this calculation : date( decimal-date-time(${StartDate}) + 29 ). This would give 30 March, if startDate is 01 March.Sorry, but In my understanding this would mean "29 days after"? "One day later" means tomorrow for me, so 01 March >> 02 March.

Do systematic tests, please, and be aware that this depends on the correct date and timezone setting of the used device.

For date / time functions see https://docs.getodk.org/form-operators-functions/#converting-dates-and-time. And you can find a lot of examples for date calculations with the search function of this forum.

1 Like