Code from
DayOfWeek day = DateTime.Now.DayOfWeek;
int days = day - DayOfWeek.Monday;
DateTime start = DateTime.Now.AddDays(-days);
DateTime end = start.AddDays(6);
http://www.codekeep.net/snippets/0d955fdd-ff9e-4403-90cb-15dac8391034.aspx
Code from
DayOfWeek day = DateTime.Now.DayOfWeek;
int days = day - DayOfWeek.Monday;
DateTime start = DateTime.Now.AddDays(-days);
DateTime end = start.AddDays(6);
No comments:
Post a Comment