Capture duration (time) of the survey

1274
5
Jump to solution
07-08-2021 09:46 AM
PamelaLandy
Occasional Contributor


Hi everyone,

How can I take note of the time it takes to carry out a survey ( in survey123 ) from the beginning to the end (50 questions) and to be able to save that period of time (minutes) in the database? . Thanks

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

There are question types start and end available. They are hidden questions that simply log the date and time the survey was started and ended, respectively.

To populate a field with the duration, you can simply use the calculation ${end_time_field} - ${start_time_field}. This will return the number of milliseconds between the two, which you can then divide by 60,000 to get the minutes.

EDIT: I should mention this requires the use of Survey123 Connect.

- Josh Carlson
Kendall County GIS

View solution in original post

5 Replies
ABishop
MVP Regular Contributor

I don't see where Survey123 will allow this type of tracking by default.  As a suggestion, you may want to add a field to your data to have the user enter the time started and then at the end of the survey, the time stopped.  Then you can use those two times to do your own analysis on the back end.

Amanda Bishop, GISP
0 Kudos
jcarlson
MVP Esteemed Contributor

There are question types start and end available. They are hidden questions that simply log the date and time the survey was started and ended, respectively.

To populate a field with the duration, you can simply use the calculation ${end_time_field} - ${start_time_field}. This will return the number of milliseconds between the two, which you can then divide by 60,000 to get the minutes.

EDIT: I should mention this requires the use of Survey123 Connect.

- Josh Carlson
Kendall County GIS
DougBrowning
MVP Esteemed Contributor

One issue we had with this is if you edit the form the times are really long.  Not sure if once() would help.

ChuckShaw1
New Contributor

This appears to be just what I'm looking for.  However, when I tried this solution, it doesn't appear to give me the times in milliseconds.  The first time I filled out the survey it gave me dates with times as the output.  The calculate field that I created to subtract the end time from the start time spit out a date of 1970-01-01.  Each time I filled out the survey it gave me this same value.  

 

I tried changing the field type to integer on these fields but when I did that it simply spit out 2023 for the start and end dates and the calculate field spit out 1970.  

Is there a setting in there somewhere that I need to change so that it looks at the times in milliseconds rather than a date?

 

0 Kudos
DougBrowning
MVP Esteemed Contributor

I did it this way.

Have a time field called StartedForm with a calc of once(now())

Add a Note field Minutes Elapsed with a calc of round(int(now() - ${StartedForm}) div (1000*60),1)

This was back from 2020 and we do not use it anymore so not positive.

0 Kudos