Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Based on Current Date get all previous months in current year

SejalP1
7 - Meteor

Hi,

 

Based on current date, would like to have all past months in current year.

 

For example

Input Date is:

Date 
10/09/2019

 

Required Output:

Output Date
10/01/2019
10/02/2019
10/03/2019
10/04/2019
10/05/2019
10/06/2019
10/07/2019
10/08/2019

 

Many Thanks.

 

 

4 REPLIES 4
LukeM
Moderator
Moderator

Hi @SejalP1 ,

 

You'll need the generate rows tool.

 

18-09-19.PNG

 

Please be mindful tat your dates need to be formatted correctly so Alteryx can work with them. For this you may need to use the DateTimeParse tool.

geraldo
13 - Pulsar

hi 

 

Follows attached workflow

CharlieS
17 - Castor
17 - Castor

I was able to achieve this using the Generate Rows tool. Check out the attached example to see this in action. 

danilang
19 - Altair
19 - Altair

Hi @SejalP1 

 

Similar to the solutions from @CharlieS , @geraldo  and @LukeM with difference being that the you don't need to enter the current date in an input box.  The generate rows uses DateTimeToday() as a starting value

 

w.png

 

Dan

Labels
Top Solution Authors