📜  c# 将秒转换为小时分秒 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:38.585000             🧑  作者: Mango

代码示例1
TimeSpan t = TimeSpan.FromSeconds( secs );

string answer = string.Format("{0:D2}h:{1:D2}m:{2:D2}s:{3:D3}ms", 
                t.Hours, 
                t.Minutes, 
                t.Seconds, 
                t.Milliseconds);