Given a date, how to find the beginning date and ending date of that week

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

My ASPX page has a calendar, and when the user click any date on the
calendar, it will display the report during that week.

My question is when the program query database, I need to know the beginning
date and ending date of that week.

Any ideas??
 
My ASPX page has a calendar, and when the user click any date on the
calendar, it will display the report during that week.

My question is when the program query database, I need to know the beginning
date and ending date of that week.

Any ideas??
The datepart function will tell you the current day of the week, eg
Sunday 0, Monday 1, etc. Use the value from that to add to or
subtract from to get Sunday and Saturday.
 
Back
Top