Hi all,
I have a small problem with the code below, the 'days' variable always seems to be 0 no matter how far apart the days are.
Can you see anything obviously wrong?
System.TimeSpan span = dates[0] - dates[1]; // e.g. 12/04/2010 11:44:08 and 18/05/2010 11:52:19
int days = (int)span.TotalDays;
if (days > 10) //days always seems to be 0
{
throw new Exception("Over 10 days");
}
Thanks