标签:
获取当前月的第一天和最后一天
DateTime now = DateTime.Now; DateTime firstDay = new DateTime(now.Year, now.Month, 1); DateTime lastDay = firstDay.AddMonths(1).AddDays(-1);
计算两个日期差多少天
DateTime start=firstDay; DateTime end=lastDay; TimeSpan ts=end.Subtract(start); ts.Days;
标签:
原文地址:http://www.cnblogs.com/ZXdeveloper/p/4586886.html