Weeknumber and date

F

feorges

Hi,
i looking for a mather to ,when i know the number of the week, get the first
day and the last day of that week

regards, Georges
 
M

Marshall Barton

feorges said:
i looking for a mather to ,when i know the number of the week, get the first
day and the last day of that week

Once you calculate the first time in the year that the first
day of the week occurs, then just use the DateAdd function
to add your number of weeks. Obviously, determining the
first day of the week in the year is the issue and it
depends on how you define the first week in a year. That
value is something you need to use to calculate your week
number (using the DatePart function) so you should already
know how to do that.
 
M

Mike Painter

Marshall said:
Once you calculate the first time in the year that the first
day of the week occurs, then just use the DateAdd function
to add your number of weeks. Obviously, determining the
first day of the week in the year is the issue and it
depends on how you define the first week in a year. That
value is something you need to use to calculate your week
number (using the DatePart function) so you should already
know how to do that.


Note that if the week number comes from formatting a date then format it to
return the day of week number and use date add to get the first or last,
then add or subtract one to get teh other date.
 

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

Top