d = DateTime.Now; int dayofweek =(int) d.DayOfWeek; if (dayofweek != 0) { d = d.AddDays(1 - dayofweek); } else { d = d.AddDays(-6); }