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

  • Thread starter Thread starter Clddleopard
  • Start date Start date
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.
 
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.
 
Back
Top