Finding number of weeks within a period

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