Select to view content in your preferred language

Calculate time in Survey123 by adding from select_one or integer input

679
2
Jump to solution
06-19-2022 05:15 PM
SophieMuller
New Contributor

Is it possible in Survey123 to calculate a second time based on variable input within the survey e.g. from a select_one or as an integer? 

I have previously done this for dates by adding a frequency specified in a select_one list to the date in the survey but I can't see an obvious way to do it for time.

Ideally, I'd like to be able to add minutes or hours to the start time of a field visit to calculate the next check-in required for that site either as a choice (10mins, 20mins, 30mins) or as an integer input.

Date example: date(decimal-date-time(${StartTime}) + ${AuditFreq}*30.45)

For time every example I've seen has been a fixed period e.g. date-time(decimal-date-time(now()) +  0.0104166675) rather than a time that is variable.

0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

Like this?  XLS file attached.

Time_Add.gif

IsmaelChivite_0-1655690089070.png

XLS file attached.

View solution in original post

2 Replies
IsmaelChivite
Esri Notable Contributor

Like this?  XLS file attached.

Time_Add.gif

IsmaelChivite_0-1655690089070.png

XLS file attached.

SophieMuller
New Contributor

Yes! That's exactly it! Thanks Ismael 🙂

0 Kudos