Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here
SOLVED

Engine.IterationNumber not working in DateTimeAdd function within formula tool

Highlighted
7 - Meteor

Hello,

 

I am attempting to practice building an iterative macro that will simply return all the dates of the year 2019. However, it looks like the Engine.IterationNumber variable inserted into my DateTimeAdd Function in the formula tool is not having the intended effect of increasing the "FromDate" column by 1 day before looping back around.

 

Any ideas would be greatly appreciated!

Highlighted
14 - Magnetar

Hi @SgdPackard810,

 

you were pretty close to the actual solution, you only made one mistake: Your input doesn't match your output.

 

Input date formatOutput date format
1/1/20202020-01-01

 

I removed the DateTime-Tools and formated the input dates in the Alteryx Date-Format and it works perfectly fine!

 

 

2020-08-04 19-26-43.png

 

Fixed Macro attached. Let me know if it works for you!

 

Best

Alex

Highlighted
7 - Meteor

Thanks so much!

Labels