Alteryx Designer Desktop Discussions

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

Creation of time slots using Generate Rows tool

Pawel_Paleczny
9 - Comet

Hello,

 

I would like to create 5 minutes slots based on start and end time ie. from 9:00-17:00 -> 9:05 (next row) 9:10 etc. Is it possible to do this using Generate Rows tool without date inside?

7 REPLIES 7
DataNath
17 - Castor

@Pawel_Paleczny even if there's no date in your dataset, I think you'd always need at least a dummy date with the time element to use DateTimeAdd(). You could just place a Select afterwards and change the datatype to Time in order to drop the date:

 

DataNath_0-1683631037551.pngDataNath_1-1683631045363.png

binuacs
20 - Arcturus

@Pawel_Paleczny One way of doing this

binuacs_0-1683631248358.png

 

Pawel_Paleczny
9 - Comet

Thanks @DataNath and @binuacs! However still in both solutions we have dummy date (1900-01-01 or 2023-01-01) and my question is if we can create time interval without any dummy date? It doesn't necessarily have to be Generate Rows tool.

binuacs
20 - Arcturus

@Pawel_Paleczny The DateTimeAdd () function works with the DateTime Field (both date and time), it will not work only with the time field, that's why the dummy date is included along with the time field. Do you see any issues adding the dummy date along with the time field for calculation?

Pawel_Paleczny
9 - Comet

From my perspective it's working perfectly however Client intention is to prepare minutes interval without any dummy dates to avoid any potential confusing :)

binuacs
20 - Arcturus

@Pawel_Paleczny Even though the dummy date used in the formula but it will not reflect in the output, the output will give only the time

Pawel_Paleczny
9 - Comet

The assumptions of the project make it necessary to take into account not only the output but also the entire workflow, which will ultimately be managed by less technical people, so I would also like to avoid including the date :)

Labels