Tuesday, December 24, 2013

C#: Get Hours, Minutes, seconds from total Minutes using TimeSpan

var ts = TimeSpan.FromMinutes(intMinutes);
var message = string.Format("Hours: {0}, Minutes: {1}, Seconds: {2}", ts.Hours, ts.Minutes, ts.Seconds);

Console.WriteLine(message);

No comments:

Post a Comment