Mega Code Archive

 
Categories / C# / Date Time
 

Time String

using System; using System.Collections.Generic; using System.Linq; using System.Text; public static class Utils {     public static string GetTimeString(int time)     {         int h = time / (60 * 60);         int tMinush = time % (60 * 60);         int m = tMinush / 60;         int s = tMinush % 60;         return "" + h.ToString("00") + ":" + m.ToString("00") + ":" + s.ToString("00");     } }