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
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to