You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/05/01 15:27:21 UTC

[Bug 56478] New: TEXT function date format does not format number when the format contains non-standard characters

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


[Bug 56478] TEXT function date format does not format number when the format contains non-standard characters

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56478

James Clark <J....@uk.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |J.CD.Clark@uk.ibm.com
                 OS|                            |All

-- 
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