DateTime t1 = DateTime.Parse("2005-01-01");
DateTime t2 = DateTime.Parse("2006-01-01");
System.TimeSpan ts = t2 - t1;
int days = ts.Days;
转载于:https://www.cnblogs.com/fanyipeng/archive/2009/06/16/1504129.html