Sreenath G

Sreenath G

  • NA
  • 233
  • 310.6k

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

May 27 2011 4:49 AM

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)