Using the calculation int((${arrival_time}-${dispatch_time}) div (1000*60)) to calculate the response time (in minutes).
Formula works in connect and app, but not in the web form.
Is there an alternate formula I can use to obtain this value, that will work in the app and in the web form?
Solved! Go to Solution.
Hi @JasonCyphers ,
Please refer to the topic on decimal date time; the web app uses decimal dates (i.e., 1 = 1 day)
Hello @JasonCyphers,
The Survey123 website uses decimal date time whereas the field app uses both decimal date time and epoch time. The calculation you have written is in epoch time, your calculation will need to use decimal date time for it to work in both the Survey123 web app and field app.
The calculation would need to be: int((decimal-date-time(${arrival_time})-decimal-date-time(${dispatch_time})) * 24*60)
Please see the Constraints and Calculations section of Ismael's Esri Community blog for reference. Please also see the Decimal date time documentation for more information.
Thank you,
Zach
Hi @JasonCyphers ,
Please refer to the topic on decimal date time; the web app uses decimal dates (i.e., 1 = 1 day)
Hello @JasonCyphers,
The Survey123 website uses decimal date time whereas the field app uses both decimal date time and epoch time. The calculation you have written is in epoch time, your calculation will need to use decimal date time for it to work in both the Survey123 web app and field app.
The calculation would need to be: int((decimal-date-time(${arrival_time})-decimal-date-time(${dispatch_time})) * 24*60)
Please see the Constraints and Calculations section of Ismael's Esri Community blog for reference. Please also see the Decimal date time documentation for more information.
Thank you,
Zach