Find Sunday and Saturday

  • Thread starter Thread starter Jerry
  • Start date Start date
J

Jerry

Given a selected date, how do I find the date of the Sunday and Saturday of
the week that that date is in?

Thanks!

Jerry
 
You can use the Weekday function which, by default, returns 1 for Sunday, 2
for Monday and so on up to 7 for Saturday. Knowing which day it is, you can
easily figure out how many days you need to subtract for the previous
Sunday, or add for the following Saturday.
 
Given a selected date, how do I find the date of the Sunday
and Saturday of the week that that date is in?

Thanks!

Jerry
The format() function will return the day of week as a number 1 to
7 when given the "w" option. To get the saturday, use the dateadd()
function to increase the date by the number needed.

It's all in the help files.
 
Back
Top