We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Calculate days from dates

nirvapatel1998
7 - Meteor

Hi all, 

 

I need help with the following: 

 

Attached is the input file and following the the expected output from the table 

 

IDStart DateEnd DateQtyDays
538267384947400020230202202303152.2 
538267384947400020230315202303231.3 
538267384947400020230323202303154.5 
538267384947400020230315202303163.5 
538267384947400020230316202303173.68 
538267384947400020230317202303282.4 
538267384947400020230328202303313.7 
538267384947400020230331202305034.6 
563783962293370020230131202303062.3 
563783962293370020230306202303076.7 
563783962293370020230307202303098.9 
563783962293370020230309202303106.7 
563783962293370020230310202303137.8 
563783962293370020230313202303144.7 
563783962293370020230314 4.9 

 

If there is no date2 in for ID then use current date or else use the date2 for id 

 

I need to calculate how many days in the days column using start date and end date. 

 

can someone please guide on how I can achieve the result. 

 

Thank you 

3 REPLIES 3
messi007
15 - Aurora
15 - Aurora

@nirvapatel1998,

 

Please see below:

 

Convert.PNG

 

Attached the workfow,

Regards

nirvapatel1998
7 - Meteor

Hi, 

 

Thank you for the solution, but what I need is that we use Date 2 only when end date is empty field in the output and if Date 2 is also empty then use the current date. 

messi007
15 - Aurora
15 - Aurora

@nirvapatel1998,

 

Please see attached.

Row 8 date 2 is not empty so I keept it.

Last Row, Date 2 is empty so I used the same date.

 

 

Convert.PNG

Labels
Top Solution Authors