# 30 minutes incremental loop

**URL:** <https://forum.knime.com/t/30-minutes-incremental-loop/32619>\
**Category:** KNIME Analytics Platform\
**Created:** [April 29, 2021, 12:36pm UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619 "2021-04-29T12:36:25Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sm0lda](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@sm0lda](https://forum.knime.com/u/sm0lda)\
**Post date:** [April 29, 2021, 12:36pm UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/1 "2021-04-29T12:36:25Z")

</div>

Hello guys,

I have a question regarding to 30 minutes time incremental.

I have REST API workflow which works pretty well. As an input I use start date and end date.

**For example:**  
**start date:** 2021-04-01T00:00:00  
**end date:** 2021-04-30T23:59:59

REST API gives me back what I am asking for, but only 500 lines not more. Complete month has definitely more than 500 lines. I know there is in 30 minutes period never more than 500 lines. Due to this fact I need to split the whole month into 30 minutes periods and send more REST-API commands. Not just one for complete month, because I would receive ONLY 500 lines again. I have investigated REST-API has its own limits.

At the end I don’t send only one commands, but 30 days x 24 hours x 2 = 1440 commands separately and at the end collect complete month.

But how to create loop increasing my start date by 30 minutes till end date?

**I look for something like this:**  
2021-04-01T00:00:00  
2021-04-01T00:30:00  
2021-04-01T01:00:00  
2021-04-01T01:30:00  
.  
.  
2021-04-30T23:30:00

Any idea?

Thank you very much.

Jiri

---

<div class="post-metadata">

**Author:** ![morpheus](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/m/ce73a5/32.png) [@morpheus](https://forum.knime.com/u/morpheus)\
**Post date:** [April 29, 2021, 1:00pm UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/2 "2021-04-29T13:00:00Z")

</div>

Hi Jiri,

why do you dont split the task in two parts?

The first part only build the table only for the days (e.g. 2021-04-01, 2021-04-02, etc.)  
and the second task to build the time scheme for only 1 day (e.g. 00:00, 00:30, 01:00, etc.)

and the use the cross-joiner-node to combine both tables?

BR  
Hermann

---

<div class="post-metadata">

**Author:** ![sm0lda](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@sm0lda](https://forum.knime.com/u/sm0lda)\
**Post date:** [April 29, 2021, 1:03pm UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/3 "2021-04-29T13:03:29Z")

</div>

Hello @morpheus,

No I didn’t try it, but theoretically it should work. I am going to try it.

**But for other users:** please feel free to give me some another hints

Thank you

Jiri

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [April 29, 2021, 1:33pm UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/4 "2021-04-29T13:33:01Z")

</div>

Hi @sm0lda Your problem, if I understand it correctly, is very similar to this one from a few days ago, and I suspect my solution to that would be similar for you

> [@resample hourly data to minute data](https://forum.knime.com/t/resample-hourly-data-to-minute-data/32571):
>
> Hello, I cannot come up with an idea of resampling hourly data set into minute data set so that in the end I would get a 60 times bigger data set. To be more precise - I have a 2 column data set with the column 1 being time in hours and column 2 being value. However, instead of hourly data I need a minute data so that each minute of a given hour has the same value like the hour in the original data. Can Knime help me in achieving that?

I have attached a modified version of that workflow

[Duplicate Sample Without Looping-2.knwf](https://forum.knime.com/uploads/short-url/nVxlWBGrWqjB3l4I00S0Ww7jUfR.knwf) (19.5 KB)  
(re-edited - and updated comments on nodes to reflect new requirement)

---

<div class="post-metadata">

**Author:** ![HansS](https://forum-cdn.knime.com/user_avatar/forum.knime.com/hanss/32/6979_2.png) [@HansS](https://forum.knime.com/u/HansS)\
**Post date:** [April 29, 2021, 1:54pm UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/5 "2021-04-29T13:54:07Z")

</div>

Hi @sm0lda  
As @takbb your question is very similar to a question asked yesterday. And as KNIME has multiple options to solve almost everything. Here is an example using a loop.  
[30\_minutes\_incremental\_loop.knwf](https://forum.knime.com/uploads/short-url/94pkTcvxx5176afSiISLpql6p9g.knwf) (28.3 KB)  
 ![Schermafdruk van 2021-04-29 15-48-21](https://forum-cdn.knime.com/uploads/default/original/3X/8/4/84543368cacacaca003cdd1abaa542d095b9b166.png)  
The Counting Loop, creates x new time stapmp with an interval of (in this case) 30 seconds.

gr. Hans

---

<div class="post-metadata">

**Author:** ![Daniel\_Weikert](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/d/e47c2d/32.png) [@Daniel\_Weikert](https://forum.knime.com/u/Daniel_Weikert)\
**Post date:** [April 29, 2021, 5:25pm UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/6 "2021-04-29T17:25:35Z")

</div>

I have to say I like the idea coming from the “Matrix” with the crossjoin

If you want to do it with python then this could be an option (I used a table but you can also create a metanode and use configuration nodes)

 ![11](https://forum-cdn.knime.com/uploads/default/original/3X/d/e/dede01365ccefefa664e55b199d2f401d45c1bd6.png)

 ![12](https://forum-cdn.knime.com/uploads/default/original/3X/0/c/0cc2b3225a51626fb4a37a0eb976a1e6bdcfb02b.png)

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [April 29, 2021, 5:54pm UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/7 "2021-04-29T17:54:24Z")

</div>

@Daniel_Weikert Now that’s just showing off! 😂 Brilliant!

---

<div class="post-metadata">

**Author:** ![Daniel\_Weikert](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/d/e47c2d/32.png) [@Daniel\_Weikert](https://forum.knime.com/u/Daniel_Weikert)\
**Post date:** [April 30, 2021, 3:43pm UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/8 "2021-04-30T15:43:00Z")

</div>

Just one of the few times I can actually contribute here 😉  
As far as I have seen you have become one of the main contributors to this great community. (No matter the topic! 😂 ) I am always curious about the solutions you come up with next.  
I really appreciate your posts and hope you will continue helping all of us here.

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [April 30, 2021, 4:14pm UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/9 "2021-04-30T16:14:33Z")

</div>

That’s very kind of you Daniel. I hope that mostly my answers are on the right track and don’t miss the point too much. I’m sure that for many of my solutions Knime has a better way that I don’t yet know about, but I also like reading other people’s solutions to the same problem (and other problems) as so often I then discover a different angle, or feature that I didn’t know about.

There’s plenty of questions asked that I can’t answer, especially when they are in more specialist areas, but I still like to read them anyway. 🙂

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [May 11, 2021, 11:41am UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/10 "2021-05-11T11:41:48Z")

</div>

Hello all,

nice ideas and discussion. Really enjoy reading it 🙂

One more way to create needed interval is [Create Date&Time Range](https://kni.me/n/zWwbyiLGE3YSbr4_) node 😉

Br,  
Ivan

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [May 11, 2021, 12:06pm UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/11 "2021-05-11T12:06:30Z")

</div>

> [@takbb](#):
>
> as so often I then discover a different angle, or feature that I didn’t know about.

Thanks @ipazin, another node I didn’t know about to add to the growing toolbox… I knew you wouldn’t let me down… 😂

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [November 10, 2021, 12:06am UTC](https://forum.knime.com/t/30-minutes-incremental-loop/32619/12 "2021-11-10T00:06:41Z")

</div>

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