Creating a date from week number, day number and year value

C

Clddleopard

I have a table with the week number, the day of the week number and the year.
I need to convert it into an actual date. Example:
Week# 42 Day# 6 (or Saturday) Year 2010
Any function to do this?
Thanks for any help.
 
J

John W. Vinson

I have a table with the week number, the day of the week number and the year.
I need to convert it into an actual date. Example:
Week# 42 Day# 6 (or Saturday) Year 2010
Any function to do this?
Thanks for any help.

There's an ambiguity in week numbers, of course - is the first week of the
year the week containing January 1 (even if that's Saturday at the end of the
week), the week containing the first Tuesday, etc.? See the online help for
DatePart to see your options.

That said...

DateAdd("ww", [Weekno], DateSerial([Yearfield], 1, 1)) + [DayNo]

should do it. I believe there's an optional argument to DateAdd to handle the
interpretation of the week number.
 

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

Similar Threads

Week Number 2
Finding the date of the first day of the week using "ww" to ID Wee 3
week numbers 3
Convert week number to a date 4
Week number from date 3
Get date for start of week 3
UK Tax Week 4
Week number 1

Top