.net 中两个日期算经过的月份数
1 DateTime startDate = DateTime.Parse("2014-11-1"); 2 DateTime endDate = DateTime.Parse("2015-9-1"); 3 int totalMonth = endDate.Year * 12 + endDate.Month - startDate.Year * 12 - startDate.Month;
1 DateTime startDate = DateTime.Parse("2014-11-1"); 2 DateTime endDate = DateTime.Parse("2015-9-1"); 3 int totalMonth = endDate.Year * 12 + endDate.Month - startDate.Year * 12 - startDate.Month;