How to add business days to the date field.
I would like to add the business days to the date field.
Example
Sl.No. | Date | Business Days | NewDate with Business Days |
1 | 13-May-19 | 10 | 24-May-19 |
2 | 13-May-19 | 15 | 31-May-19 |
3 | 13-May-19 | 20 | 07-Jun-19 |
4 | 13-May-19 | 25 | 14-Jun-19 |
5 | 13-May-19 | 30 | 21-Jun-19 |
Please help to find the NewDate based on adding the business days.
Thanks in advance.
Solved! Go to Solution.
When you're dealing with business days, you need to take both weekends and holidays into account.
This workflow takes your input, generates dates into the future and then removes both weekends and holidays from the resulting data set, returning the date that is X business days from the start
The output is as follows
Edit the list of holidays to fit your local requirements
Dan
Thanks Dan on your quick response and it is working good.
I've another scenario, i.e. to add 25 Business Days to the different dates and example as below -
Sl.No. | Date | Business Days | NewDate |
1 | 13-May-19 | 25 | 14-Jun-19 |
2 | 20-May-19 | 25 | 21-Jun-19 |
3 | 05-May-19 | 25 | 07-Jun-19 |
4 | 01-May-19 | 25 | 04-Jun-19 |
5 | 10-May-19 | 25 | 13-Jun-19 |
NOTE: Sl.No. 3 marked with red color since 05-May-19 is Sunday and adding next 25 Business days to such dates.
Will you please help on the above to get the NewDate value based on adding 25 days to the given date.
Thanks in advance.
This new version will handle any number of start dates with different numbers of business days as well. I had to add an Sort tool to the original
Dan
Nevermind for the statement below, I figured it out. It is a condition of the DateTimeAdd Function for increment
In your condition expression within the Generate Rows tool, could you help me understand what 50 represents
Dates <= DateTimeAdd([Date],50,"days")
it represents no of days to add.
Hi. How would you adjust the "Generate Dates" node where you want the date to fall 3 business days prior to another date in the list? For example, if we have a meeting on Jan 18, 2023, but need to send the content 3 business days prior to the meeting, we'd want to send it on January 12, 2023 (to account for MLK + weekends). Thanks!!
I thought to share a great resource on DateTime Functions in Alteryx, which should serve as a great reference for most questions asked here: https://help.alteryx.com/20223/designer/datetime-functions
Thanks, @Adrian_T !! This is a great page! However, I'm not able to find an answer to my question about regarding Generate Dates for dates prior to a date in the list. Maybe I'm missing it... Any ideas?
Hi Danil,
is there any specific reason why in generate rows tool >> condition expression >> Dates <= DateTimeAdd([Date],50,"days")
50 days has been used.
In my scenario i need to add only 1 working day, can I use the same formula?