CSharp examples for System:DateTime Format
To Duration String
using System;//from www.j av a2 s . co m public class Main{ public static string ToDurationString(this DateTime since, DateTime start) { var ts = new TimeSpan(start.Ticks - since.Ticks); return ts.ToDurationString(); } }