Answers
Dec 22, 2009 - 06:13 PM
eg
DateTime dt1 = ... some date value
DateTime dt2 = ... another date value
TimeSpan ts = dt1 - dt2;
or
TimeSpan ts = dt1.Subtract(dt2);
then use Days to get the number of days
eg
int daysDiff = ts.Days;
Dec 22, 2009 - 06:15 PM
Add New Comment