public static void exec(int day_before) { DateTime now = DateTime.Now; string tag = now.ToString("yyyyMMdd"); DateTime end = now.AddDays(day_before); DateTime start = new DateTime(); string[] list = Constant.ANALYZE_TIME.Split('-'); BizApi.DeleteAnalyzeData(tag); foreach (string i in list) { start = end.AddMonths(-int.Parse(i)); BizApi.InsertAnalyzeData(tag, start, end); } }