Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / VB

First day date in week based on particular date

3.50/5 (3 votes)
6 Dec 2010CPOL 7K  
public DateTime GetFirstDayOfWeek2( DateTime date) { return date.AddDays(-(int)date.DayOfWeek); }
C#
public  DateTime GetFirstDayOfWeek2( DateTime date)
        {
            return date.AddDays(-(int)date.DayOfWeek);
        }

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)