To Duration String - CSharp System

CSharp examples for System:DateTime Format

Description

To Duration String

Demo Code


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();
        }
}

Related Tutorials