Saturday, July 17, 2010

Difference in Time with two dates in C#

This piece of code shows the difference in two dates in C#.  I used this piece of code in my DOFF application as shown above.


DateTime dt1 = ;
DateTime dt2 = ;

TimeSpan ts = dt1 - dt2;

int days = ts.Days;

No comments:

Post a Comment