Search code examples
exceltimetimestamptime-format

Turning string into time in excel


does somebody how I can turn this string: PT5H23M into a usable time in excel? This should put out 5h 23 min?

Thank you.


Solution

  • Use SUBSTITUTE:

    =--SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"M",":00"),"H",":"),"PT","")
    

    Then format the output: [hh]" h" mm" min"

    enter image description here