Advent of Code is now back for a limited time only! Complete as many challenges as you can to earn those badges you may have missed in December. Learn more about how to participate here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Deriving all the months from a start to end date

Apcvirgo1
7 - Meteor

Hi all,

 

I have user input for a date range and need to derive all the months in the range. Is there a tool that can handle this?

 

Example

Start              End

2022-01-01   2022-06-30

 

return months 01,02,03,04,05,06

 

Thanks in advance,

Anthony

 

 

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

How does something like this look @Apcvirgo1? It generates a load of new rows, checking that the month and year of Start <=  the month and year of End, adding one month each time. Once it hits the end of that, it then strips out only the month part of those dates and consolidates them into a single row containing the original Start and End dates as well.

 

DataNath_0-1657133664617.png

 

Apcvirgo1
7 - Meteor

Thanks DataNath, I'll use this for sure.

Labels
Top Solution Authors