Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3154

Date handling in XLS tables

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 5.2.0.Final
    • drools-decisiontables
    • None

      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.

              manstis@redhat.com Michael Anstis
              manstis@redhat.com Michael Anstis
              Archiver:
              rhn-support-ceverson Clark Everson

                Created:
                Updated:
                Archived: