标签:ar os sp on 2014 art ad 时间 res
int num = 41; //第几周
string year = "2014"; //年份
DateTime dt;
DateTime.TryParse(year + "-1-1", out dt); //取该年第一天
int dw = Convert.ToInt32(dt.DayOfWeek.ToString("d")); //该年第一天为星期几
int days = (num - 1) * 7 - dw;
DateTime start = dt.AddDays(days); //第n周起始日期
DateTime end = dt.AddDays(days + 6); //第n周结束日期
Response.Write(start.ToShortDateString() + " " + end.ToShortDateString());
标签:ar os sp on 2014 art ad 时间 res
原文地址:http://www.cnblogs.com/lyl6796910/p/4086693.html