community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
#SANTALYTICS

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More
SOLVED

Generate Dates

I'm trying to generate a date for every day of the year for 2016 so I want to have 2016/01/01-2016/12/31.  Is there an easy way to do this in Alteryx?

Alteryx Certified Partner
Alteryx Certified Partner

Use the Generate Rows tool and the DATETIMEADD() function

 

DATETIMEADD([day_column], 1, 'days')

Thanks for the response.  This is what I tried to do, but I must be doing something wrong because I can't get it to work.  Is this something you have done that you could show me what I'm doing wrong?

 

Generate Dates.PNG

Alteryx Certified Partner
Alteryx Certified Partner

You are almost there! Couple of things:

 

(1) Your date string in Initialization Expression needs to be of the format '2016-01-01'

 

(2) Your condition should be [Day] <= '2016-12-31' This keeps looping the function until you reach the end of the year.

I knew I had to be close!  Thanks for the help.  

Labels