10 Replies Latest reply: May 19, 2014 4:31 AM by Nagaian Krishnamoorthy RSS

    group time intervals into time range

      Hi, I want to group the time intervals into time range and this is what I scripted:

       

      load *,if(timediff<30,'<30',

          if(timediff>=30 and timediff <60,'<60',

          if(timediff>=60 and timediff <90,'<90',

          if(timediff>=90 and timediff <120,'<120',

          if(timediff>=120 and timediff <150,'<150',

          if(timediff>=150 and timediff <180,'<180',

          if(timediff>=180 and timediff <210,'<210',

          if(timediff>=210 and timediff <240,'<240',

          if(timediff>=240 and timediff <270,'<270',

          if(timediff>=270 and timediff <300,'<300',

          if(timediff>=300 and timediff <330,'<330',

          if(timediff>=330 and timediff <360,'<360')))))))))))) as timeinterval;

       

      timediff contains the text type for the time intervals in minutes.

       

      The result I got in the timediff listbox is only until '<90' when I'm supposed to get til '<360'. Thanks.