Duration between two times

You can also have scenarios where you want to find the number of hours worked. It is the amount of time that you want to find out. In that case, you can use the following formula where time1 and time2 are the times selected from timepickers. We are using the TIMESTR function here to convert the string TIME to a readable format specified here as “HH:mm”.


TIMESTR(time, format)


TIMESTR( time2 - time1 , “HH:mm”)

Then the output for values as follows
if Time1 = 06:16 A.M and Time2 = 06:16 P.M

Would be 12:00 hours