title: use java.util.Date in a rule's LHS
body: <p>I'm a rookie of drools, learn about and work on drools for about 10 days.
  I was faced a problem that a Date() object is to be compared in a rule's LHS part.</p>
  
  <pre><code>    // in Java
      SimpleDateFormat format = new SimpleDateFormat("MM-dd-yyyy hh:mm:ss");
      session.setGlobal("currentDate", format.format(new Date()));       
  
      # in drl file
      global java.lang.String currentDate ;
      #global java.util.Date currentDate; both tested
      when
      $united : LotteryUnitedDO(lotteryTypeId == LotteryTypeEnum.SSQ, 
          totalFee &gt;= 1000, 
          shareCnt &gt;= (0.1 * totalShare),
          #unitedEndTime is a java.util.Date Object
              unitedEndTime &gt; currentDate     
          )
  </code></pre>
  
  <p>the value of currentDate is the current date, I've seen some examples and articles doing this but they used only the "yyyy-mm-dd" part of the date. Yet I have to compare the "hh:mm:ss" part. like this:</p>
  
  <pre><code>    $dateInputBox : DateInputBox(verifyDate &gt; "12-Oct-2005")        
  </code></pre>
  
  <p>I tried to change the "drools.dateformat" property and format the date inserted into knowledge base only to get various of compilation error.So How can I deal with this or drools is just unable to deal with the hour part of a date in LHS?</p>
  
  <p>Thanks in advance, all your suggestions are appreciated.</p>