Alison Posted August 30, 2018 Report Share Posted August 30, 2018 Hello, Is there a solution for calculating the number of working days between two dates without weekends and holidays. Please help Quote Link to comment Share on other sites More sharing options...
0 vinebath Posted August 30, 2018 Report Share Posted August 30, 2018 Firstly, you should have two tables: 1. Source table with the records, and two fields of these records should be two dates that will set the period. 2. A table where you store holidays dates. You should create a datapage on the first table and create a Calculated Field on the "Configure Results Page Fields" screen with the following code: SELECT (DATEDIFF(dd, [@field:Date1], [@field:Date2]) + 1) -(DATEDIFF(wk, [@field:Date1], [@field:Date2])*2) -( SELECT Count(*) FROM Holidays WHERE (Date BETWEEN [@field:Date1] AND [@field:Date2]) AND (DATENAME(weekday, Date) != 'Sunday' AND DATENAME(weekday, Date) != 'Saturday') ) [@field:Date1] is a start date and [@field:Date2] is an end date, and Holidays is a table with the holidays days. Quote Link to comment Share on other sites More sharing options...
0 cheonsa Posted April 5, 2022 Report Share Posted April 5, 2022 Hello! Here's another post that calculates number of working days excluding weekends and holidays using Application Tasks: Quote Link to comment Share on other sites More sharing options...
Question
Alison
Hello,
Is there a solution for calculating the number of working days between two dates without weekends and holidays.
Please help
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.