poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56478] New: TEXT function date format does not format number when the format contains non-standard characters
Date Thu, 01 May 2014 13:27:21 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=56478

            Bug ID: 56478
           Summary: TEXT function date format does not format number when
                    the format contains non-standard characters
           Product: POI
           Version: 3.10
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: dev@poi.apache.org
          Reporter: J.CD.Clark@uk.ibm.com

Created attachment 31580
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31580&action=edit
An example Java program and spreadsheet to demonstrate the issue

When using the TEXT function and combining it with the NOW function as its
value, the POI FormulaEvaluator works fine when dealing with a standard format
e.g:

=TEXT(NOW();"yyyy-MM-ddhh-mm-ss")

Excel output = 2014-05-0114-25-35
POI output = 2014-05-0114-25-35

When the format contains a less typical value however, the string value
returned is  the unformatted output of NOW(). For example, the case we have
(and demonstrated in the attached program) is when the format contains a 'T':

=TEXT(NOW();"yyyy-MM-ddThh-mm-ss")

Excel output = 2014-05-01T14-24-17
POI output = 41760.60074957176

Thanks,
James

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message