日期:2014-05-20 浏览次数:21148 次
DateTime startDate = DateTime.Parse("2008-1-1"); DateTime endDate = DateTime.Parse("2010-10-31"); int totalMonth = endDate.Year * 12 + endDate.Month - startDate.Year * 12 - startDate.Month;
------解决方案--------------------
C# codeDateTime startDate = DateTime.Parse("2008-1-1"); DateTime endDate = DateTime.Parse("2010-10-31"); int totalMonth = endDate.Year * 12 + endDate.Month - startDate.Year * 12 - startDate.Month;
------解决方案--------------------
C# codeDateTime startDate = DateTime.Parse("2008-1-1"); DateTime endDate = DateTime.Parse("2010-10-31"); int totalMonth = endDate.Year * 12 + endDate.Month - startDate.Year * 12 - startDate.Month;