Finding number of weeks within a period

M

MaggieL

My data consists of StartDate, EndDate, StartTime, EndTime, Mon, Tue, Wed,
Thur, Fri, Sat, Sun (days of week are check box format y/n)

I need to calculate the NumOfHours for an event. For example:
StartDate: 2/1/2010
EndDate: 2/15/2010
StartTime: 6:00:pM
EndTime: 7:00:pM
Mon is checked
The NumOfHours should = 2

I can calculate the NumHrsPerDay and the NumOfDaysPerWk BUT.....
can't seem to get the last part which is how many Mondays are in the date
period.
Thanks, Margaret
 
J

John W. Vinson

My data consists of StartDate, EndDate, StartTime, EndTime, Mon, Tue, Wed,
Thur, Fri, Sat, Sun (days of week are check box format y/n)

I need to calculate the NumOfHours for an event. For example:
StartDate: 2/1/2010
EndDate: 2/15/2010
StartTime: 6:00:pM
EndTime: 7:00:pM
Mon is checked
The NumOfHours should = 2

I can calculate the NumHrsPerDay and the NumOfDaysPerWk BUT.....
can't seem to get the last part which is how many Mondays are in the date
period.
Thanks, Margaret

DateDiff("ww", [StartDate], [EndDate], 2)

The 2 means that the week starts on Monday, so the function will count the
number of sunday-to-monday boundaries between the dates.
 

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

Top