To be a little clearer, the current date and time needs to be within the time interval specified by the start date and time and the ‘start date and time + duration’, something like

 

               start-datetime <= current-datetime <= start-datetime + duration

 

But I’m not sure how to express the above properly. Can this be done with just one condition, or will I need two conditions?

 

From: Arocho, Vance A (CTR)
Sent: Tuesday, July 29, 2014 12:31 PM
To: 'rules-users@lists.jboss.org'
Subject: Need to create condition based on current date and time, start date and time, and duration

 

I’m using Drools 5.4, and am developing an Excel spreadsheet containing a decision table that requires another condition based on

 

·        The current date and time specified as an attribute on a Java object

·        The start date and duration of an event that are both specified within the spreadsheet (duration should be specified in hours)

 

Is there a way to do this?