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

Alteryx Designer Desktop Discussions

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

How To: Generate rows of date and limit the time difference

askbyung1
5 - Atom

Hi,

I am looking for help to change the DateTime difference. Currently, I only can show the Start Date and End Date.  But, I'd like to make the End Date with more details as it is cut off by midnight each day.  Also, I want to make the time difference does not exceed 1440mins. Then it will need more rows of dates as shown in the screenshot below. Can you help me?  Thanks!!

 

Input

Start_DateEnd_Date
5/5/2021 6:305/20/2021 8:00

 

Output

DateStart_DateEnd_DateDiff
5/5/20215/5/2021 6:305/5/2021 23:591049
5/6/20215/6/2021 0:005/6/2021 23:591439
5/7/20215/7/2021 0:005/7/2021 23:591439
5/8/20215/8/2021 0:005/8/2021 23:591439
5/9/20215/9/2021 0:005/9/2021 23:591439
5/10/20215/10/2021 0:005/10/2021 23:591439
5/11/20215/11/2021 0:005/11/2021 23:591439
5/12/20215/12/2021 0:005/12/2021 23:591439
5/13/20215/13/2021 0:005/13/2021 23:591439
5/14/20215/14/2021 0:005/14/2021 23:591439
5/15/20215/15/2021 0:005/15/2021 23:591439
5/16/20215/16/2021 0:005/16/2021 23:591439
5/17/20215/17/2021 0:005/17/2021 23:591439
5/18/20215/18/2021 0:005/18/2021 23:591439
5/19/20215/19/2021 0:005/19/2021 23:591439
5/20/20215/20/2021 0:005/20/2021 8:00480
5 REPLIES 5
Emil_Kos
17 - Castor
17 - Castor

Hi @askbyung1,

 

I have made it work for you:

 

Emil_Kos_0-1622239607230.png

 

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @askbyung1,

 

I went for a slightly different approach to @Emil_Kos with most of the heavy lifting done in the formula tool:

 

Jonathan-Sherman_0-1622240680275.png

 

I've attached my workflow for you to download if needed!

 

Kind regards,

Jonathan

 

Emil_Kos
17 - Castor
17 - Castor

Hi @Jonathan-Sherman,

 

I need to start using the multi-field formula to parse more than one column at a time. Very elegant solution thank you for sharing!

Jonathan-Sherman
15 - Aurora
15 - Aurora

No problem at all!

askbyung1
5 - Atom

Thank you so much for your help!

Labels