C#计算日期和时间差的方法
DateTime t1 = DateTime.Parse("2005-01-01"); DateTime t2 = DateTime.Parse("2006-01-01"); System.TimeSpan ts = t2 - t1; int days = ts.Days;
C#计算日期和时间差的方法
DateTime t1 = DateTime.Parse("2005-01-01"); DateTime t2 = DateTime.Parse("2006-01-01"); System.TimeSpan ts = t2 - t1; int days = ts.Days;