Re: [rules-users] Using DateFormat and getting today's date in drools5.0

2011-12-28 Thread kwyto
I'm having a similar problem, but so far I have found that drools.dateformat
is a System Property. You can set it in your code by using
System.setProperty(drools.dateformat, dd/MM/). although the default
is dd-MMM- (12-DEC-2008). Also, I'm using tomcat so to set it using
command line use -Ddrools.dateformat=dd/MM/ or whatever else format
you want to use. Date formatting can be found here
http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm

--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-DateFormat-and-getting-today-s-date-in-drools5-0-tp60531p3617648.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Using DateFormat and getting today's date in drools5.0

2009-11-19 Thread ABRA2

Can somebody help me please? i am not able to find answers to this question
yet.

thanks
ABRA2


-- 
View this message in context: 
http://old.nabble.com/Using-DateFormat-and-getting-today%27s-date-in-drools5.0-tp26402736p26424219.html
Sent from the drools - user mailing list archive at Nabble.com.

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


[rules-users] Using DateFormat and getting today's date in drools5.0

2009-11-17 Thread ABRA2

I need to compare date from java bean to system date for a rule. I referred
to previous posts, drools expert documentation and tried to come up with a
rule which is not yet working. Please help me for the same.

1. Which package should i import to use DateFactory? It is not in
org.drools.base.evaluators.DateFactory anymore i guess. Is there a better
way to get CurrentSystemDate other than using DateFactory? 

2. In my JavaBean the date has format dd/MM/. So where do i set this
format to drools.dateformat? In my .drl file or in the java pgm where i load
the .drl file and do insertion of fact objects and fire the rules. 


rule SetTktIssueDate
when
DateFactory($sysdate : today )
$br:BillingRecord(tktIssueDate==null || tktIssueDate  sysdate)
then
modify($br){setTktIssueDate(sysdate);}

thanks
ABRA2

-- 
View this message in context: 
http://old.nabble.com/Using-DateFormat-and-getting-today%27s-date-in-drools5.0-tp26402736p26402736.html
Sent from the drools - user mailing list archive at Nabble.com.

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