Alteryx Designer Desktop Discussions

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

Creating date difference and create bins

sriniprad08
11 - Bolide

Hi Team,

 

I have a below situation

1) Find the difference between two dates and calculate the days.

2) Create bins based on the below criteria.

 

Please let me know how to go about it.

 

IdDate 1Date 2
112/13/200212/30/2021
21/15/200312/20/2002
34/8/200312/31/2003
27/2/200312/31/2020
48/6/20039/30/2003
48/6/20039/30/2004
48/6/20031/30/2004
48/6/20032/27/2004
48/6/20032/27/2004
48/6/200311/30/2003
48/6/200310/31/2003
58/6/20031/30/2004
58/6/200311/30/2003
 8/6/200310/31/2003

 

 
 
 
 
 
 
 
 
10 REPLIES 10
sriniprad08
11 - Bolide

sriniprad08_0-1604329319402.png

 

sriniprad08_1-1604329348746.png

 

 

atcodedog05
22 - Nova
22 - Nova

Hi 

 

Here is a workflow for the task.

Output:

atcodedog05_0-1604329497688.png

 

 

Workflow:

atcodedog05_1-1604329510568.png

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

atcodedog05
22 - Nova
22 - Nova

Hi 

 

Here is the completed workflow for the task.

Output:

atcodedog05_0-1604329769538.png

Workflow:

atcodedog05_1-1604329783536.png

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

sriniprad08
11 - Bolide

hi @atcodedog05 

Great thank you so much 🙂

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @sriniprad08 

 

Cheers and Happy Analyzing 😀

sriniprad08
11 - Bolide

Hi @atcodedog05 ,

 

Thanks for the solution. However i am getting warnings and it's not giving me number of days and also giving me same bins for all the dates. It's the same data which i shared yesterday. Can you please let me know . Please find attached the warnings, Thanks

sriniprad08_0-1604395621570.pngsriniprad08_1-1604395647367.png

sriniprad08_2-1604395667612.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @sriniprad08 

 

Your date format has changed hence its throwing a parse error.

atcodedog05
22 - Nova
22 - Nova

Hi @sriniprad08 

 

Since its already in dates you can just use the formula.

DateTimeDiff([Date 2],[Date 1],"days")
sriniprad08
11 - Bolide

Hi @atcodedog05 

thank you so much 🙂

 

cheers,

Labels