The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Create new date rows for a specific amount of days using 'generate rows' function

sureslala
アステロイド

Hello

I'm having trouble trying to generate a new column of consecutive dates for 2254 days forward from a starting date.

 

As an example starting with date '11-Apr-22', I want to create 2254 new date records increasing from the start date by one day until it reaches date '11-Jun-28'. In excel it would look like this.

 

sureslala_0-1649795664912.png

 

I've created a simple workflow attached using the 'Generate Rows' tool but I'm having trouble with my expressions. 

 

sureslala_1-1649796835124.png

 

I think I'm on the right track on how to go about resolving this problem, but need assistance with maybe the expressions?

 

Any help would be very much appreciated!

 

Thanks

Sures

 

6件の返信6
Matthew
ボリード

i believe all you need to do is change your condition expression to be "<=" not "="

binu_acs
ポラリス

@sureslala you need to convert the date in datetime format 

 

binuacs_0-1649798154826.png

 

sureslala
アステロイド

Thanks Binuacs, 

I'm getting an error message when I updated my expression in my main workflow 'The value did not change after the Loop Expression'?

Any idea on what I have done wrong?

Thanks

Sures

 

 

sureslala_0-1649799799983.png

 

JarekSkudrzyk
ボリード

@sureslala I think the date format is causing the issue - you need to amend the format "%d-%b-%y" to suit your input data, which is now yyyy-mm-dd (from what I see in the error message on your printscreen)

JarekSkudrzyk
ボリード

@sureslala If your input column is now in date format, the "generate rows" tool config should look like this:

JarekSkudrzyk_0-1649800682963.png

 

binu_acs
ポラリス

@sureslala I used the DateTimePrase([Date],'%d-%b-%y') format because the given date was in the format dd-mmm-yy, But your original date if the ReportedDate field is in datetime format no need to use the DateTimeParse function. As mentioned like @JarekSkudrzyk you can simply use this field in the generate row tool. I would suggest you to check the metadeta for your fields so that you will have an idea of what needs to be done.

ラベル
トップのソリューション投稿者