INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Calculating the Number of Weeks between Dates. Only held on certain days of week (Problem: Holidays)

Calculating the Number of Weeks between Dates. Only held on certain days of week (Problem: Holidays)

Calculating the Number of Weeks between Dates. Only held on certain days of week (Problem: Holidays)

(OP)
I have version 9.

name mon tues wed thurs fri sat sun start_date end_date
test1 Y N Y N N N N 01/13/14 2/24/14
test2 Y N N N N N N 01/13/14 2/26/14

"Y" in a day of the week means it is being taught on those days of the week.

DATEDIFF("w", start_date, end_date, crMonday)+1 so each test shows that it is being held for 7 weeks but I now need to exclude holiday weeks:

test1 would be 7 weeks since they meet on Mon and Wed and only Mondays are holidays
test2 would be 5 weeks since they only meet on Mon so the weeks for MLK Day and President's Day weeks shouldn't be counted

Thanks!

RE: Calculating the Number of Weeks between Dates. Only held on certain days of week (Problem: Holidays)

Is MON set to N on days the class is not taught (holidays)?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close