I have the value like starttime(8.30 am) to endtime(5.00pm) .I need to check that whether current time is between the stattime and endtime.
rule "rule1"
when
day="Monday" && currentTime between (8.45am) and (5.00pm) ;
then
return true;
when
day="Sunday" && currentTime between (9.00am) and (11.00am);
Then
return true;
End
Insert an object of a simple class TimeOfWeek with the day of the week and the current time of the day. Then you may
@J Andy: Fusion and the temporal operators deal with events, timestamped with absolute time values. That's not what OPs constraints appear to need.