Hi guys,<br><br>I&#39;m looking to do the following and I was wondering how to use Date objects in Drools. This is what I currently have:<br><br><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5C1081199%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">rule &quot;Difference
between end and start time is less than a very small (threshold) value.&quot;</span></p>

<p class="MsoNormal" style=""><u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">salience</span></u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> 100</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">when</span></p>

<p class="MsoNormal"><u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">obs</span></u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">:
ObsClass((endTime - startTime) &lt; someVerySmallValue)</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">then<span style="">   </span></span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">    </span>System.out.<u><span style="color: black;">println</span></u>(&quot;Difference
between end and start time is less than a very small (threshold) value.&quot;);</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">End</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">rule &quot;Check if user
defined time frame falls between startTime and endTime variables&quot;</span></p>

<p class="MsoNormal" style=""><u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">salience</span></u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> 100</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">when</span></p>

<p class="MsoNormal" style=""><u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">obs</span></u><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">: ObsClass((endTime -
userDefinedTime) &gt; 0 &amp;&amp; (userDefinedTime - startTime) &gt; 0)</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">then<span style="">   </span></span></p>

<p class="MsoNormal" style=""><span style="">       </span>System.out.println(<span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&quot;Check if user defined
time frame falls between startTime and endTime variables&quot;)</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">end</span></p>

<br>The problem I&#39;m having with dates is in comparing them. The mathematical portion of the rules above kind of explain what I want to do but I doubt I&#39;ll be able to achieve my goals. Any help would be greatly appreciated.<br>
<br>Thanks in advance,<br>Armaghan<br>