统计需要计算的时间

                 //统计今日
                         startDate = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
                 //统计本周 

               startDate = DateTime.Now.AddDays(DayOfWeek.Monday - DateTime.Today.DayOfWeek).ToString("yyyy-MM-dd 00:00:00");
                 //统计本月 

                  startDate = DateTime.Now.ToString("yyyy-MM-01 00:00:00");

posted @ 2013-05-16 20:23  狄大人  阅读(209)  评论(0编辑  收藏  举报