Working Days Excluding Saturdays, Sundays and Holidays in a given period.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • santiagj
    New Member
    • Dec 2015
    • 1

    Working Days Excluding Saturdays, Sundays and Holidays in a given period.

    I want to calculate working Days Excluding Saturdays and Sundays in a given period.

    I have the following queri statement to exclude saturday and sunday:

    Code:
    System Test Working Days LT: (
       ([Testing End Date]-[Sample Received Date])
       +(Weekday([Sample Received Date])-1)
       -(Weekday([Testing End Date])-1))
       *5/7-1
       +IIf((Weekday([Testing End Date])-1)-1>5,
          5,
          (Weekday([Testing End Date])-1))
       -IIf((Weekday([Sample Received Date])-1)>5,
          5,
          (Weekday([Sample Received Date])-1)-1)
    I need add the statement to exclude Holiday. Please give me the specific code or statement. Copy and paste. Thanks
    Last edited by zmbd; Dec 3 '15, 08:23 PM. Reason: [z{stepped eq}{Demands for code are normally not allowed. See FAQ :) }]
  • mbizup
    New Member
    • Jun 2015
    • 80

    #2
    <<. Please give me the apecifict code or statement. Copy and paste. >>

    It's not quite that simple.

    To do this, you need to define what days are holidays (these of course differ between countries, employers, etc), by setting up a table of holidays.

    Read this article about calculating working days. It contains a sample that you should be able to apply to your own database.

    Comment

    • Seth Schrock
      Recognized Expert Specialist
      • Dec 2010
      • 2965

      #3
      Here is a link that describes how to list the holidays that you want excluded and also exclude the weekend: Counting the Number of Working Days

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        Originally posted by SantiagJ
        SantiagJ:
        Please give me the specific code or statement. Copy and paste. Thanks
        As that is specifically prohibited it's lucky this question doesn't lend itself to such a simple approach.

        Perhaps it's not such a great idea to advertise that you aren't even expecting to do any of the work yourself when asking for others to spend their time helping you. I can't imagine too many experts being inspired to help you.

        Comment

        Working...