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

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??
 
M

Matthew Speed

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top