Get Paid By Click

Mginger Mobile Money

Jan 20, 2010

calculate difference of two datetimepicker values in hours

datetimepicker dt1,dt2;



if (dt1.Value >= dt2.Value)
{
    double totalTime;
    TimeSpan ts = dt1.Value.Subtract(dt2.Value);
    totalTime = Convert.ToDouble(ts.TotalHours).ToString("N2") ;
 }

Easy Way To Pay

Sign up for PayPal and start accepting credit card payments instantly.

Earn While Searching