C# 时间处理(DateTime和TimeSpan)_暗夜__的博客-CSDN博客_c# datetime timespan
1.计算2个时间差(分钟,保留2位小数)
TimeSpan timeSpan = EndedTime - StartedTime;
double aaa = Math.Round(timeSpan.TotalMinutes,2);
string ShutdownDuration = Convert.ToString(aaa);
C# 时间处理(DateTime和TimeSpan)_暗夜__的博客-CSDN博客_c# datetime timespan
TimeSpan timeSpan = EndedTime - StartedTime;
double aaa = Math.Round(timeSpan.TotalMinutes,2);
string ShutdownDuration = Convert.ToString(aaa);