I have a function below which I use to format a string. The string is something like this \"PT1H3M20S\" which means 1 hour 3 minutes and 20 seconds. In my function, I want to fo
In your case, your string carries no character for minutes, so you can make a check if the string does not contain minutes, then add "00:" between 1:20 and format appropriately.