From: Clddleopard on 12 Oct 2009 16:27 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.
From: John W. Vinson on 12 Oct 2009 17:09 On Mon, 12 Oct 2009 13:27:01 -0700, Clddleopard <Clddleopard(a)discussions.microsoft.com> wrote: >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. -- John W. Vinson [MVP]
|
Pages: 1 Prev: Chat GIRL&BOY FRIEND EVERY DAY Next: Access 2007 Automation -- Unable to Show Popup Menu |