Generate record for each date in a range of date

Hello everyone,
Starting from a dataset where I have “Start_Date” (DD/MM/YY), “End_Date”(DD/MM/YY), “Frequency” (Monthly or Weekly) and “execution day” (MO,TU,WE,TH,FR,SA,SU).

How can I obtain from a single record, many records for each date of execution of the service?

I’m trying to use “Data&Time Shift” Node, but what i need is different, because for a single record, I would need to have as many records as the execution dates (also specifying the exact date DD/MM/YY).

Thanks in advance for every kind of suggestions.

Bye,
Alberto

Its not clear what you mean by “execution date”? Is it day of week?

@albertoruggeri1
It’s always a good idea to post sample data and/or a workflow for the community to better understand and help.
You might want to check out create date time range node or one row to many with additional datetime shift or math operations
br

2 Likes

Hi @albertoruggeri1 .

Have you tried the node Create Date&Time Range?

Br

1 Like

Sorry if my topic wasn’t clear.
I will try again.

I have a dataset composed in this way:

|Execution Day| Data_Start | Data_End | Frequency | Day |
|||| 01/01/2024 | 31/12/2024 | Weekly | Monday|
||
|| 01/01/2024 | 15/07/2024 | Weekly | Saturday|

What i need is a node that generate from the first rows, a lot of row for each date of execution. For example:

image

| Execution Day | Data_Start | Data_End | Frequency | Day |
|…01/01/2024… | 01/01/2024 | 31/12/2024 | Weekly | Monday |
|…08/01/2024… | 01/01/2024 | 31/12/2024 | Weekly | Monday |
|…15/01/2024… | 01/01/2024 | 31/12/2024 | Weekly | Monday |
…generate rows until the achievement of the Data end

|…05/01/2024… | 01/01/2024 |15/07/2024 | Weekly | Saturday |
|…12/01/2024… | 01/01/2024 | 15/07/2024 | Weekly | Saturday |
|…19/01/2024… | 01/01/2024 | 15/07/2024 | Weekly | Saturday |

Thanks in advace, and I hope I’ve been a little clearer than before.
Have a nice day,
Alberto

Hello.
Here is a step by step tutorial in Power Query, maybe it can inspire you to reproduce it in Knime: Tutorial

Hi @albertoruggeri1

Please try my solution. Start Date must be your first execution day.

start_stop.knwf (84.9 KB)

Br

1 Like

@albertoruggeri1 question is what exactly you are expect ting as a result. One option is to employ Python and ChatGPT to generate the data you (might) want. This will create the Execution_days per line, start at the first weekday within you range and run until the end is reached:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.