Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loop for every minute between a time frame?

Hi all,

Below I have posted a link to a similar problem. I have tried the solution, but doesn't work for time, only for date fields.

Basically, I have run a loop so it makes a new row of data for every date between the 2 specified dates for the original row. This will create a new field with this new date which will be one of those dates.

The question is, what if I want to do the same for the time? So if I have StartTime: 12:00 and EndTime of:12:20, I would like to loop it so that I have 21 rows of data for each of the minutes..

Is that possible to do with the minutes also and not just the days(date)?

Many thanks,

Bruno Pereira

capture dates in between start date and end date

1 Reply
Nicole-Smith

This should do it for time:

let MinTime = num(Time#('12:00','hh:mm'));

let MaxTime = num(Time#('12:20','hh:mm'));

Data:

Load Time($(MinTime)-1/1440+iterno()/1440,'hh:mm') as Time autogenerate 1 While iterno()/1440 <= $(MaxTime)+2/1440 - $(MinTime);

let MinTime = null();

let MaxTime = null();