1DateTime startDate = new DateTime (2008, 1, 1); 2DateTime endDate = new DateTime (2008, 1, 5); 3TimeSpan ts = endDate - startDate; 4 5long days = ts.Days; 6long hours = ts.TotalHours; 7long mins = ts.TotalMinutes; 8long secs = ts.TotalSeconds;