Return dates excluding weekends and holidays
Return dates excluding weekends and holidays
(OP)
I am working on a teaching db for courses. Known information, week start day, start date of course, number of days in the course, and holidays.
Given the start date and number of days I would like the query to return all dates for the class excluding weekends and holidays.
The reason for knowing the week start date is so it can be used in any country.
Can anyone help. Also, is there a way to set the work week in MS Access 2010 or do I have to use the weekday function everywhere?
Thanks,
Given the start date and number of days I would like the query to return all dates for the class excluding weekends and holidays.
The reason for knowing the week start date is so it can be used in any country.
Can anyone help. Also, is there a way to set the work week in MS Access 2010 or do I have to use the weekday function everywhere?
Thanks,
RE: Return dates excluding weekends and holidays
Duane
Hook'D on Access
MS Access MVP
RE: Return dates excluding weekends and holidays
RE: Return dates excluding weekends and holidays
RE: Return dates excluding weekends and holidays
CODE
module for holidays
CODE
So you query would be between start date and end date and day of week not Sat and Not Sun and not holiday.
My table of dates would look like
CODE
ID dtmDate dayOfWeek isHoliday 1 1/1/2015 Thursday True 2 1/2/2015 Friday False 3 1/3/2015 Saturday False 4 1/4/2015 Sunday False 5 1/5/2015 Monday False 6 1/6/2015 Tuesday False 7 1/7/2015 Wednesday False 8 1/8/2015 Thursday False 9 1/9/2015 Friday False