Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi AIl
i have created interval match based on Half an hour
i need the result like if Start Hour =13:00 and End Hour = 16:00 means i want to set Event Hour flag for 13:00, 13:30, 14:00,14:30,15:00,15:30 but in below image, it considered 16:00 also Event Hour
if Start Hour =14:00 and End Hour = 17:00 means i want to set Event Hour flag for 14:00,14:30,15:00,15:30,16:00,16:30
but in below image, it start from 14:30 to 17:00
Try this
1:
LOAD * INLINE [
EventDate, StartHour, EndHour
8/30/2017, 14:00, 17:00
9/15/2017, 13:00, 16:00
9/22/2017, 13:00, 16:00
];
NoConcatenate
2:
load Date(EventDate,'MM/DD/YYYY') as EventDate,
Time(Time#(StartHour,'hh:mm')-MakeTime(0,0,1),'hh:mm') as StartHour,
Time(Time#(EndHour,'hh:mm')+MakeTime(0,0,1),'hh:mm') as EndHour
Resident 1; DROP Table 1;
JOIN(2)
LOAD
Time(Time#('09:00','hh:mm') + ((RowNo()-1)/48),'hh:mm') AS Hour
AUTOGENERATE(20)
;
IntervalMatch:
IntervalMatch(Hour)
LOAD
StartHour,
EndHour
RESIDENT 2;
JOIN(2)
LOAD *, Num(1) as EventHour
Resident IntervalMatch; DROP Table IntervalMatch;
Try this
1:
LOAD * INLINE [
EventDate, StartHour, EndHour
8/30/2017, 14:00, 17:00
9/15/2017, 13:00, 16:00
9/22/2017, 13:00, 16:00
];
NoConcatenate
2:
load Date(EventDate,'MM/DD/YYYY') as EventDate,
Time(Time#(StartHour,'hh:mm')-MakeTime(0,0,1),'hh:mm') as StartHour,
Time(Time#(EndHour,'hh:mm')+MakeTime(0,0,1),'hh:mm') as EndHour
Resident 1; DROP Table 1;
JOIN(2)
LOAD
Time(Time#('09:00','hh:mm') + ((RowNo()-1)/48),'hh:mm') AS Hour
AUTOGENERATE(20)
;
IntervalMatch:
IntervalMatch(Hour)
LOAD
StartHour,
EndHour
RESIDENT 2;
JOIN(2)
LOAD *, Num(1) as EventHour
Resident IntervalMatch; DROP Table IntervalMatch;
Hi
Please see the sample app.
It is working fine for me.
Regards
Pratyush