Code like this works with both versions. Can you please provide a complete (reduced) example<br>producing the error?<br><br><br><div class="gmail_quote">On 27 May 2011 22:31, magaram <span dir="ltr">&lt;<a href="mailto:magaram@deltadentalmi.com">magaram@deltadentalmi.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">hi -<br>
<br>
  i am using drools-distribution-5.2.0.M2. Here is the drl i am using -<br>
<br>
----------<br>
dialect &quot;mvel&quot;<br>
<br>
import com.deltadental.drools.sample.*<br>
<br>
rule &quot;Rule 01&quot;<br>
when<br>
    $underageCustomer : Customer(dob&gt;&quot;15-May-1993&quot;)<br>
    $order : Order(customerId == $underageCustomer.customerId)<br>
    eval($order.discountPercentage == 0)<br>
then<br>
    $order.discountPercentage = 25;<br>
    System.out.println(&quot;Rule 01 fired. Applied discount<br>
&quot;+$order.discountPercentage);<br>
end<br>
------------------<br>
<br>
<br>
I get a RuntimeDroolsException: Exception executing predicate dob &gt;<br>
&quot;15-May-1993&quot;<br>
Caused by: java.lang.RuntimeException: uncomparable values &lt;&lt;Mon May 01<br>
00:00:00 EDT 2000&gt;&gt; and &lt;&lt;15-May-1993&gt;&gt;<br>
<br>
caused by a class cast exception - String cannot be converted to a Date.<br>
<br>
I get the same exception with 5.1.1. I tried the same setting Locale and<br>
drools.dateformat properties - no luck so far..<br>
<br>
  Am I missing something here?<br>
<br>
Thanks<br>
Muk<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/drools-date-compare-not-working-as-documented-tp2994330p2994330.html" target="_blank">http://drools.46999.n3.nabble.com/drools-date-compare-not-working-as-documented-tp2994330p2994330.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>