Hi Waruna:

    Thank you for your reply.
    I understand that it need to set an alternative date format to 
drools.dateformat, 
    but I do not know to set it, Do I need to modify the code of BRS?




stevegyc

From: Waruna Jayaweera
Date: 2014-09-10 18:39
To: stevegyc
CC: dev
Subject: Re: [Dev] [BRS]How to modify date formats in drools.
Hi Stevegyc,
According to drools document,
The date format dd-mmm-yyyy is supported by default. You can customize this by 
providing an alternative date format mask as the System property named 
drools.dateformat. If more control is required, use a restriction.


So you can set custom value to System property drools.dateformat to modify the 
data format.


According to that below restriction should also work.


rule "Date-restricted rule"
    date-effective "10.9.2014 8:00"      # 8 AM
    date-expires   "10.9.2014 17:00"     # 5 PM
    when
    then
end


Thanks,
Waruna



On Wed, Sep 10, 2014 at 8:42 AM, stevegyc <[email protected]> wrote:

Hi:

    The default date format in drools is 'dd-MMM-yyyy', 
    but in the definition of rule attribute date-effective, it says it contain 
a date and time definition.
    It need to use the date format as 'dd-MMM-yyyy HH:mm'.

    Any one know how to modify the date format to 'dd-MMM-yyyy HH:mm'?




stevegyc

_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev







-- 

Regards,


Waruna Lakshitha Jayaweera
Software Engineer
WSO2 Inc; http://wso2.com
phone: +94713255198
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to