Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Remove weekends to find difference between two dates

Shaaz
9 - Comet

Hi

 

Can you please let me know how to find the difference between two dates. Here I've to exclude weekends, also general holidays while finding the difference. Attached is the sample data, here I'm doing Pay_Date - Due_Date.

4 REPLIES 4
LordNeilLord
15 - Aurora

Hey @Shaaz

 

I'd do something like this:

 

Working Days.PNG

 

If you wanted to exclude holidays then you can join in a mapping file with the dates and the fiter them out before the summarize tool.

 

Chhamanshu
7 - Meteor

Hi Neils,

 

I have looked into the solution what if the Pay date is less than the due date

 

Pay date                Due date

2017-06-21            2017-06-29

 

then this logic won't work. Could you please help me to provide me the solution in this case.

ranjitrao80
5 - Atom

How can we achieve the same in case of a situation where in lieu of an Excel the data source was a database and the only tools we would need to use be in-db ones.

shreyanshrathod
11 - Bolide

Hi @Shaaz 

 

I am attaching my solution here.

 

There are a few nuances here that are to be taken care of :-

         1. Pay_date can be less than Due_date

         2. Pay_date can be equal to Due_date.

 

@LordNeilLord , @Chhamanshu I have taken care of both in my solution.

Any thoughts ?

Labels