.NET Tricks, Tips, and Snippets
TimeSpan timeSpan = new TimeSpan(DateTime.UtcNow.Ticks - scriptTime.Ticks); string timeStr = timeSpan.Hours.ToString().PadLeft(2, '0') + ":" + timeSpan.Minutes.ToString().PadLeft(2, '0') + ":" + timeSpan.Seconds.ToString().PadLeft(2, '0');
Post a Comment
No comments:
Post a Comment