public static DateTime GetWeekCommencing(DateTime date)
{
CultureInfo info = Thread.CurrentThread.CurrentCulture;
DayOfWeek firstday = info.DateTimeFormat.FirstDayOfWeek;
DayOfWeek today = info.Calendar.GetDayOfWeek(date);
int diff = today - firstday;
DateTime firstDate = date.AddDays(-diff);
return firstDate;
}
Get Week Commencing from DateTime in C#
This snippet will calculate the date of the start of the week from a given DateTime and return a DateTime containing the week commencing date.