Select to view content in your preferred language

How to calculate total hours worked from 2 time fields?

458
1
05-10-2022 12:55 PM
GISManager4
Occasional Contributor

I need assistance with a formula that takes the values entered from 2 time fields into a total hours work field.Capture.JPG

Attached is the xlsx file

0 Kudos
1 Reply
ZacharySutherby
Esri Regular Contributor

Hello @GISManager4,

Please check out the Dates and Times sample available in Survey123 Connect, the same shows how to perform calculations on dates and times in Survey123. 

The calculation that would work for your use case would be (decimal-time(${end_time}) - decimal-time(${start_time})) *24 *60 (calculates minutes elapsed) or (decimal-time(${end_time}) - decimal-time(${start_time})) *24 (calculates hours elapsed).

Thank you,
Zach