/ 计算2个日期之间的天数差 DateTime dt1 = Convert.DateTime("2007-8-1"); DateTime dt2 = Convert.DateTime("2007-8-15"); TimeSpan span = dt2.Subtract(dt1); int dayDiff = span.Days + 1;
/ 计算2个日期之间的天数差 DateTime dt1 = Convert.DateTime("2007-8-1"); DateTime dt2 = Convert.DateTime("2007-8-15"); TimeSpan span = dt2.Subtract(dt1); int dayDiff = span.Days + 1;