Convert.ToDateTime(DateTime.Today.AddDays(-(int)DateTime.Today.DayOfWeek - 7) + (DateTime.Today.Date - DateTime.Today.AddDays(-(int)DateTime.Today.DayOfWeek - 7)) - (DateTime.Today.AddDays(-(int)DateTime.Today.DayOfWeek) - DateTime.Today.AddDays(-(int)DateTime.Today.DayOfWeek - 7))).ToString("yyyyMMdd")
//此為今天的一個星期前的日期
EX:今天:2008/11/07
一個星期前:2008/10/31
為了搞這個想真久= =....
哈哈!
回覆刪除辛苦了~~~