2 Replies Latest reply: Nov 23, 2016 4:03 PM by Massimo Grossi

# Create intervals between a range

I have a start time and a stop time what I'd like to do is create records for every hour in between.

For example:

Current:

Record NumStart TimeStop Time
110:0013:27

What I want

Record Num

Hour interval
110:00
111:00
112:00
1

13:00

113:27
• ###### Re: Create intervals between a range

May be try this:

Table:

Time(RangeMin(Round([Start Time] - MakeTime(1) + MakeTime(IterNo()), 1/24), [Stop Time])) as [Hour Interval]

While Round([Start Time] - MakeTime(1) + MakeTime(IterNo()), 1/24) < [Stop Time] + MakeTime(1);

Record Num, Start Time, Stop Time

1, 10:00, 13:27

];

• ###### Re: Create intervals between a range

X:

[Record Num],

[Start Time],

[Stop Time],

Time([Start Time] + 1/24 * (iterno()-1)) as Hour

FROM

(html, codepage is 1252, embedded labels, table is @1)

While [Start Time] + 1/24 * (iterno()-1) <=  [Stop Time]

;

Concatenate (X)

X:

First 1

[Record Num],

[Start Time],

[Stop Time],

0+[Stop Time] as Hour

FROM