Hi Sudhir,
I haven't used dates in Drools the way
that you are; however, I have used dates elsewhere in drools DRL files.
It is my understanding that the default date format is "dd-MMM-yyyy".
You can change that format to include times by setting a system property
called "drools.dateformat". An example is below:
System.setProperty("drools.dateformat",
"dd-MMM-yyyy HH:mm");
-Steve
rules-users-bounces@lists.jboss.org wrote on 05/13/2010
07:14:41 AM:
> From:
>
> Esteban Aliverti <esteban.aliverti@gmail.com>
>
> To:
>
> Rules Users List <rules-users@lists.jboss.org>
>
> Date:
>
> 05/13/2010 07:20 AM
>
> Subject:
>
> Re: [rules-users] help in date time format
>
> Sent by:
>
> rules-users-bounces@lists.jboss.org
>
> Maybe using a function to convert Strings to Date?
> On Thu, May 13, 2010 at 9:06 AM, Sudhir M <sudhir.cse@gmail.com>
wrote:
> Hi,
>
> My requirement is to compare two dates one a date object and the other
> a date literal. In comparison it should also consider time. There
is
> format given for date literal (dd-mmm-yyy) but how can we add time
to
> it? I tried adding time it doesn't complain but seems to ignore the
> time part in the date literal.
>
> below is the example
>
> Exam(name=="Math", examDate<="13-may-2010")
this is my pattern.
>
> tried
>
> Exam(name=="Math", examDate<="15-may-2010 17:00:00")
but time ignored
> while executing.
>
> Is there any format for DateTime?
>
> Thanks,
> sudhir.
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> --
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> Esteban Aliverti_______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users