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: [email protected]
Reporter: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]