Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Datetimediff using only weekdays/business days

JessicaAddy
5 - Atom

Is there a way to calculate the number of weekdays/business days between two dates?  I have spent some time searching the internet and the Alteryx Community, but cannot find any solutions to this.

 

Thanks!

Jessica

22 REPLIES 22
ponraj
13 - Pulsar

Here is the sample workflow for your case. Hope this is helpful. 

 

WorkflowWorkflowResultsResults

maramtx25
5 - Atom

Hi jdunkerley79, 

Would you please explain this part:

 

1 + 
((DateTimeDiff([EndDate],[StartDate],"days")*5 - ([StartWeekday]-[EndWeekday])*2) / 7) +
IIF([EndWeekday]==6,-1,0) +
IIF([StartWeekday]==0,-1,0)

 

Regards,

MJ 

CRogers22
8 - Asteroid

I've been using jdunkerley79's solution and its working great until I ran into negative numbers. It just pulls Null if negative and I need the actual result (the negative number).  Does anyone know a fix for this?

Labels
Top Solution Authors