View Full Version : Determine start/end day for a week number


ST4RCUTTER
04-24-2008, 08:37 AM
I am trying to avoid the creation of a lookup table where I know I should be able to calculate this. I need to determine the start and end date of a week number. I did find this post from 2002: http://www.access-programmers.co.uk/forums/showthread.php?t=33116&highlight=start+end+dates+week but it doesn't seem to work.

What I am trying to do is show all projects that were opened at the start of a week number. For example, week 2 is from 1/7/2008 and ends on 1/13/2008 (provided that your week starts in the week that 1/1 occurs and that your week starts on Monday). I need this start date so I can show all projects that started on or before 1/7/2008 and were in an open status.

If I can't calculate this then I will have to create a table and relate the query to it.

|Week Number | Start Date | End Date |

Brianwarnock
04-24-2008, 09:30 AM
Your startdate is

startdate: DateAdd("d",([weeknumber]*7)-14,#07/01/2008#)

therefore
EndDate: DateAdd("d",([weeknumber]*7)-8,#07/01/2008#)

UK formats

Brian

ST4RCUTTER
04-24-2008, 11:10 AM
Thanks for the reply Brian!

That worked terrifically!

Brianwarnock
04-24-2008, 11:15 AM
Happy to help and thanks for the response.

brian