Hi Stevegyc,

You can add following line to wso2server.sh file in <BRS_PRODUCT_HOME>/bin
to change the system property.

    -Ddrools.dateformat="dd-MMM-yyyy HH:mm" \

You will find similar kind of system property settings at end of the
wso2server.sh file.Add above line in same manner.

Thanks,
Waruna

On Wed, Sep 10, 2014 at 5:59 PM, stevegyc <steve...@163.com> wrote:

>  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 <waru...@wso2.com>
> *Date:* 2014-09-10 18:39
> *To:* stevegyc <steve...@163.com>
> *CC:* dev <dev@wso2.org>
> *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 <steve...@163.com> 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
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>  Regards,
>
> Waruna Lakshitha Jayaweera
> Software Engineer
> WSO2 Inc; http://wso2.com
> phone: +94713255198
>



-- 
Regards,

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

Reply via email to