By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,781 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,781 IT Pros & Developers. It's quick & easy.

Get first and last date of week from year and week number.

P: n/a
Hello,

Knowing year and weeknumber of this year, I'm looking for some way to get
the date of the first and last day of that particular week.

Does anyone have an idea about how to do this?

Best regards
Martin
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Martin Emanuelsson" <ma****************@guide.se> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hello,

Knowing year and weeknumber of this year, I'm looking for some way to get
the date of the first and last day of that particular week.

Does anyone have an idea about how to do this?

Best regards
Martin


Something like this maybe?
- find out weeknumber and weekday of jan 1st of that year
- from that answer add (or subtract) the required days to go to the first day of week 1
- add (weeknumber-1)*7 days to get the startdate, add another 6 days to get the last

Watch out for strange effects: jan 1st might be in the last week of the previous year
(at least here in Holland).

Hans Kesting
Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.