Forum Discussion

Arif_Awasaf_Aquib's avatar
Arif_Awasaf_Aquib
Copper Contributor
Mar 02, 2022

call time conversion

call duration was from a call and while collecting the data there different formats. I am trying to convert all the different formats and create a common format represent them.

 

Call durationCall duration in Sec
0:16:561016
08:57 sec08:57 sec
Raw dataExpected output

 

I am trying to get 537 for 08:57 sec but the formatting is not same 

4 Replies

  • bosinander's avatar
    bosinander
    Iron Contributor
    There seems to be a string " sec" trailing the time. Assuming the meaning is 8 minutes and 57 seconds you could get the five leftmost characters
    =LEFT(A1,5)
    to exclude the string but you have to append the hours to have it an Excel time stamp;
    =("00:" & LEFT(A1,5))
    Now that it looks like a time stamp you can multiply with hours, minutes and seconds a day to have it result in the number of seconds;
    =("00:" & LEFT(A2,5))*60*60*24
  • Hi,
    you would use this formula to convert time to number as you mentioned 08:58 will be 537
    =INT(A1*86400)

Resources