[jboss-jira] [JBoss JIRA] Commented: (JBRULES-3154) Date handling in XLS tables

Michael Anstis (JIRA) jira-events at lists.jboss.org
Mon Jul 25 14:02:23 EDT 2011


    [ https://issues.jboss.org/browse/JBRULES-3154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616311#comment-12616311 ] 

Michael Anstis commented on JBRULES-3154:
-----------------------------------------

Comment from OP (Vincent Legendre): Should add a warning in the doc then. May be that the fix is shorter to do...
The Date problem is common with XLS (POI has exactly the same problem), but there, the displayed value is not the one rendered in the DRL, which is a problem (in my opinion).

> Date handling in XLS tables
> ---------------------------
>
>                 Key: JBRULES-3154
>                 URL: https://issues.jboss.org/browse/JBRULES-3154
>             Project: Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: drools-decisiontables
>    Affects Versions: 5.2.0.Final
>            Reporter: Michael Anstis
>            Assignee: Michael Anstis
>
> Dates set in a XLS sheet are not read correctly under Guvnor. It seems that XLS reading transforms the date into a format that can't be properly handled by compiler.
> Example (in the repository_export.xml attached file) :
>     * My XLS has a column that tests a java.util.Date against a value : "myDate >= $param"
>     * My XLS cell contains a date, formatted by Excel (may be that's the reason) using a English format like the Guvnor default one, ie : dd-MMM-yyyy. The example date value is "01-Jan-2009" (the display, the internal value in XLS is a number...)
> Problems (at compilation and DRl generation) :
>     * Unable to create a Field value of type 'ValueType = 'Date'' and value '"1-janv.-2009"' : notice that the date value has been transformed !
>     * This value ("janv." instead of "jan") is certainly due to the fact that I am french ("janvier" is the french for "january")
>     * If I reset the french default format, ie dd/MM/yyyy, the value 01/01/2009 is tranformed to 01/01/09, and the compilation complains about unknown format (same error).
>     * If I turn the excel cell in text format, and enter "01-jan-2009", there no value transformation anymore, and the rule compiles OK.
> So I guess that reading dates in the XLS is the source of the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list