5 Replies Latest reply: Dec 3, 2015 7:58 PM by Marco Wedel

# How to create time interval selector?

Eg.

120 - 240min

240 - 360min

360 - 480min

every interval is 120min block, only 1st block is 15 - 120 min

• ###### Re: How to create time interval selector?

Maybe like

if( Minutes < 120, Dual('15 - 120 Mins',65),

Dual(floor(Minutes+1,120) & ' - ' & ceil(Minutes,120) & ' Mins', (Ceil(Minutes+1,120)+floor(Minutes,120))/2 ))

as Class;

AutoGenerate 11000;

• ###### Re: How to create time interval selector?

Min,

if(Start=0,

dual('min 15' & ' - ' & End, 15),

dual('min ' & Start & ' - ' & End, Start)

) as TimeInterval;

IterNo() as Min,

Div(IterNo(),120)*120 as Start,

Div(IterNo(),120)*120+120 as End

AutoGenerate 1

While IterNo() <= (24*60)

;

• ###### Re: How to create time interval selector?

thanks! it works!

• ###### Re: How to create time interval selector?

You can do like this as well at script level:

IF(Minutes>=15 and Minutes<120, Dual('15-120 Min',1),       //Dual() helps you in sorting

IF(Minutes>=120 and Minutes<240, Dual('120-240 Min',2),

IF(Minutes>=240 and Minutes<360, Dual('240-360 Min',3)))) as IntervalFieldName

Hope this will help!!

• ###### Re: How to create time interval selector?

Re: How to group mins into time interval