Hi Waruna:

    I have tried it, it worked!
    Thank you very much!




stevegyc

From: Waruna Jayaweera
Date: 2014-09-15 03:33
To: stevegyc
CC: dev
Subject: Re: Re: [Dev] [BRS]How to modify date formats in drools.
Hi Stevegyc,


I have attached modified wso2server.sh and wso2server.bat .I have tested in 
Linux Environment and works fine.
(I have renamed bat file due to email restrictions. Please rename it again)


Thanks,
Waruna


On Fri, Sep 12, 2014 at 9:24 AM, stevegyc <[email protected]> wrote:

Hi Waruna:

    Thank you for your indication.

    I have inserted  -Ddrools.dateformat="yyyy-MM-dd HH:mm:ss " \(I want to use 
the date format)
    to line 298 of wso2server.sh(after -Dfile.encoding=UTF8 \ )    
    but it seems does not work. 
    Is the location not correct?
    
    By the way, If I use windows, how to modify wso2server.bat?

    It will be helpful if you can send me the modified file of wso2server.sh 
and wso2server.bat.




stevegyc

From: Waruna Jayaweera
Date: 2014-09-10 22:40
To: stevegyc
CC: dev
Subject: Re: Re: [Dev] [BRS]How to modify date formats in drools.
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 <[email protected]> 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
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





-- 

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
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to