Hello everyone, I have a question about find the next working days(Lunch Delivery Dates
), I have source Data with Requested Delivery Date and Number of Day.
To add the Number of Day and find the Next the working days called(Lunch Delivery Dates ). after adding the number of days check new Lunch Delivery Date weekend or Holiday list , ignore the Date and Find the next Working Day.
Not sure I understand. What does “Number of Day” mean? What does it get added to? Also, what country do you want holidays for? It would be helpful if you could provide a small example of the expected output.
attachment take "Requested Delivery Date " and Shift the Date (Add Number of Days).after adding we will get to know that Lunch Delivery Dates ,then calculated the Lunch Delivery Dates and check if they fall on weekends or holidays, and adjust them to the find the next working day
Your data set has no delivery dates on holidays so its impossible to test on holidays. I can create a data set including holidays but I think that’s really up to you.
Here’s a workflow that handles weekends: Lunch Delivery Dates.knwf (1.1 MB)
Hi rfeigel, Thanks for your help. it’s give me some idea to continue to work.
My request is after shift the Number of Days in Requested Delivery Date The calculated the new Lunch Delivery Dates fall on holidays list, We needs to find the next working day Lunch Delivery Dates .
I have Updated with Valid Data Source and Holiday master as well
Example :
**When Requested Delivery Date is Apr 30-2025,
Lunch Delivery Dates= 30–Apr-2025 + 3 (Shift working day)+Ignore Holidays = 07-05-2025
For example,
May 1 Thur - DC works on Thur, but it’s holiday → non-working day
May 2 Fri - DC works on Fri, and it’s not holiday → working day
May 3 Sat - DC ** not works on Sat, though it’s not holiday → non-working day
May 4 Sun - DC not works on Sun, and it’s holiday → non-working day
May 5 Mon - DC works on Mon, but it’s holiday → non-working day
May 6 Tue - DC works on Tue, and it’s not holiday → working day
May 7 Wed - DC works on Wed, and it’s ** not holiday → working day{} WorkingDateCal_1.xlsx (10.4 KB)
Hi @ravishing1984 , if you create a table that consists of a concatenation of all weekends and all your holidays you can calculate the required date using a recursive loop.
From your requested dates list, calculate your initial lunch delivery date.
Feed this list into the recursive loop start.
Add a joiner node to recursive loop start that joins lunch delivery date to holiday/weekend dates
Configure the joiner collect both left unmatched (lunch delivery dates that didn’t match to a holiday/weekend date) and matched, and split results to different output ports
Pass the left unmatched output to the topmost (collector) port of a recursive loop end node
Pass the matched output of the joiner to a Date&Time shift and add 1 day to each entry in the Lunch Delivery Date column, replacing that column.
The output of the Date&Time shift goes to the lower (recursion) port of the Recursive Loop End.
If you do the above and run it, the resultant output from the loop should be the required set of dates.