Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Split the dates between the Date Intervals as separate rows

samkp
6 - Meteoroid

I have data 

 

MemberSTART_DTSTOP_DT

M1

5/1/20148/1/2014

 

I want to split the records as below

 

MemberSTART_DTSTOP_DT

M1

5/1/20148/1/2014
M16/1/20148/1/2014
M17/1/20148/1/2014

 

 

3 REPLIES 3
patrick_digan
17 - Castor
17 - Castor
I would use the generate rows tool. Update start date field. Initialize with start date field. Condition is start date < stop date. Loop expression will be using the datetimeadd function to add 1 month( or whatever formula fits your needs)

If your fields aren't coming in as alteryx dates ("yyyy-mm-dd") then you may want to use the date time tool to convert them.

SeanAdams
17 - Castor
17 - Castor

Hey @samkp

 

This is definately possible - there's a great post by @ChadM here on how to do something very similar using Generate Rows tool

https://community.alteryx.com/t5/Data-Preparation-Blending/Generate-Date-values/td-p/233

 

Essentially what you want to do is generate multiple new start dates, 1 month apart, starting from the provided start date, and ending when the start date > Stop date

 

Have a look at Chad's post, and if you're still stuck, we can help to mock this up

Cheers

Sean

samkp
6 - Meteoroid

thank you. that helped me. It's Solved.

Labels
Top Solution Authors