Re: [rules-users] help in date time format

2010-05-17 Thread Sudhir M
Thanks Steve, This solved my problem.

On 5/13/10, Steve Ronderos steve.ronde...@ni.com wrote:
 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-.  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- HH:mm);

 -Steve

 rules-users-boun...@lists.jboss.org wrote on 05/13/2010 07:14:41 AM:

 From:

 Esteban Aliverti esteban.alive...@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-boun...@lists.jboss.org

 Maybe using a function to convert Strings to Date?

 On Thu, May 13, 2010 at 9:06 AM, Sudhir M sudhir@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



 --
 

 Esteban Aliverti___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] help in date time format

2010-05-13 Thread Sudhir M
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


Re: [rules-users] help in date time format

2010-05-13 Thread Esteban Aliverti
Maybe using a function to convert Strings to Date?

On Thu, May 13, 2010 at 9:06 AM, Sudhir M sudhir@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




-- 


Esteban Aliverti
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] help in date time format

2010-05-13 Thread Steve Ronderos
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-.  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- HH:mm); 

-Steve

rules-users-boun...@lists.jboss.org wrote on 05/13/2010 07:14:41 AM:

 From:
 
 Esteban Aliverti esteban.alive...@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-boun...@lists.jboss.org
 
 Maybe using a function to convert Strings to Date?

 On Thu, May 13, 2010 at 9:06 AM, Sudhir M sudhir@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
 
 
 
 -- 
 
 
 Esteban Aliverti___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users