Convert seconds to hh:mm:ss,fff format in PowerShell

后端 未结 3 811
一向
一向 2021-01-04 01:46

I have a string representing a time in seconds and milliseconds. I want to convert it to a string in the format \"hh:mm:ss,fff\".

My solution still has the flaw that

3条回答
  •  执笔经年
    2021-01-04 02:24

    One line conversion :

    [timespan]::fromseconds(354801857.86437).tostring()
    

    return 4106.12:04:17.8640000

提交回复
热议问题