Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Hourly binding

Hi All,

I have sample data provided below. I have to create binding of times.Binding should be 10-2pm,2-7pm,7-11pm,11pm-10am How we would do this ?

 

0:00:30
0:31:30
1:00:00
1:31
9:25:39
9:45:10
10:00:00
11:25:00
11:45:00
12:00:00
13:47:00
22:00:00
23:00:00
Labels (1)
2 Replies
maxgro
MVP
MVP

load

  time,

  if(time>=10/24 and time <=14/24, '10-14',

  if(time>=14/24 and time <=19/24, '14-19',

  if(time>=19/24 and time <=23/24, '19-23',

  '23-10'

  ))) as binding;

load

  time(Time#(if(SubStringCount(time, ':')=1, time & ':00', time), 'h:m:s')) as time

inline [

time

0:00:30

0:31:30

1:00:00

1:31

9:25:39

9:45:10

10:00:00

11:25:00

11:45:00

12:00:00

13:47:00

22:00:00

23:00:00

];

1.png

tresB
Champion III
Champion III

Try like:

Class(Time#(Time,'hh:mm:ss')*24,4)