How to get the last day of the week
June 29th, 2007 by Ivan Uzunov
This sample shows how to get the last day of the current week. It easily could be reconfigured to get any day of the week of any date.
DateTime dtWET = DateTime.Today;.NET//get the last day of the week. If you need another day change the 6 to a number between 0 and 6. Please note that depending on you regional settings the week 0 day could be Sunday or Monday.
dtWET = dtWET.AddDays((-(Convert.ToInt32(dtWET.DayOfWeek))) + 6);dtWET = new DateTime(dtWET.Year, dtWET.Month, dtWET.Day, 22, 00, 0);



