Calculate Time Difference

Team,

How can we calculate the time difference between two time. Date is not available. For Example difference in “Hours:Minutes"Seconds” from intime 09:45 & Out time 18:30.

Hi @kundan.jha ,

You can refer to this article in Tips and Tricks section: Duration between two times

Infact there are more ways than one to achieve the same while playing around with the formulas. Another alternative is to use any of the following ways:

  1. (end_time_picker-start_time_picker)/(1000*60*60)
  2. CONCATENATE( TIMEDIF( timepicker3 , timepicker2 , "H") , ":" , ABS( TIMEDIF( timepicker3 , timepicker2 , "M")))

You can also check the list of supported ready formulas here: All supported Formulas

Hope this helps.

1 Like

Tried All Suggested solution but not worked.

  1. TIMESTR( time2 - time1 , “HH:mm”)
  2. (end_time_picker-start_time_picker)/(10006060)
  3. CONCATENATE( TIMEDIF( timepicker3 , timepicker2 , “H”) , “:” , ABS( TIMEDIF( timepicker3 , timepicker2 , “M”)))
  4. DATESTR( (18:00 - 09:00) - 19800000, “HH:mm” , 1)

Hi @kundan.jha ,

Like I said there can be more ways to doing the same thing.
The above methods are some of the ways in which we have internally tried and they work, ofcourse the usecases would be different.

@kundan.jha Looking at your time format, you will have to convert it into UNIX time or Date object for performing any operation/Formula on that. I suggest, you convert it into UNIX time using STRTOUNIX function. For more info - Refer this

Hope this Helps!