Bug 53397

Summary: Add support for dates in function TEXT(value, format_text)
Product: POI Reporter: Peter Taylor <peter.taylor>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED LATER    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Peter Taylor 2012-06-11 16:13:40 UTC
In Excel I can create a formula:
=TEXT("12:13:14","hh:mm:ss")

This evaluates to the time 12:13:14

The limitation is imposed by
org.apache.poi.ss.formula.functions.TextFunction#TEXT

which assumes the 1st argument is a double (immediately).
Comment 2 Nick Burch 2012-06-12 22:00:16 UTC
Any chance you could work up a patch to improve this? I guess you'll need to extend the function to check for alternate types of argument, and parse them to a double appropriately before formatting.
Comment 3 Peter Taylor 2012-06-13 08:59:27 UTC
I shall attempt to do so. But it will not be immediately.
Comment 4 Dominik Stadler 2015-06-01 21:09:21 UTC
Changing status on this one for now as "not immediately" seems to have become at some later pointer.