Select to view content in your preferred language

Calculating elapsed minutes between entered time and now() using survey on browser (not app)

291
2
Jump to solution
3 weeks ago
LS-SD
by
Occasional Contributor

I am trying to calculate the number of minutes between a time that a user enters on a form and the current time. Not the elapsed time to complete the form. 


This formula works when testing in Survey123 Connect: round(int(now() - ${StartedForm}) div (1000*60),1) but when the survey is published and used in browser, the # of minutes is blank.

 
Using the app is not an option, must use browser.

Thanks in advance for your help!

 

0 Kudos
1 Solution

Accepted Solutions
Neal_t_k
Frequent Contributor

Looks like you are using EPOCH time,  that doesn't work on the web. Convert that calculation to decimal date and it should work on Connect/Field App and Web.

Neal_t_k_0-1757614206598.png

https://community.esri.com/t5/arcgis-survey123-blog/dates-and-time-in-survey123/ba-p/895528

 

 

View solution in original post

0 Kudos
2 Replies
Neal_t_k
Frequent Contributor

Looks like you are using EPOCH time,  that doesn't work on the web. Convert that calculation to decimal date and it should work on Connect/Field App and Web.

Neal_t_k_0-1757614206598.png

https://community.esri.com/t5/arcgis-survey123-blog/dates-and-time-in-survey123/ba-p/895528

 

 

0 Kudos
LS-SD
by
Occasional Contributor

Thank you Neal. Got it working with this calculation: 
int((decimal-date-time(now()) - decimal-date-time(${wait_time})) * 24 * 60 )

 

0 Kudos