5
Answers

How to find Start and End date for a specified date in ASP.Net

Sreenath G

Sreenath G

13y
2.1k
1

Just use these functions..

 

DateTime lFnGetBeginningOfWeek(DateTime date)

{

 

return date.AddDays(-1 * (int)date.DayOfWeek).Date;

 

}

 

 

DateTime lFnGetEndOfWeek(DateTime aDate)

{

return aDate.AddDays(6 - (int)aDate.DayOfWeek);

}

 

 

Answers (5)