Bug 55063

Summary: Can not use "/" as delimiter for date in german excel
Product: POI Reporter: Michael <michael.kornatzki>
Component: HSSFAssignee: POI Developers List <dev>
Status: NEEDINFO ---    
Severity: normal    
Priority: P2    
Version: 3.9-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Michael 2013-06-05 11:28:23 UTC
Hi,

i tried to set a '/' as a delimiter for a date field in a german excel (2003) without success.

I can set any other char (also some nonsense like '+') but i didn't get it to work with '/';

this works: 
- cellStyle.setDataFormat(dataFormat.getFormat("MM-DD-YYYY"));
- cellStyle.setDataFormat(dataFormat.getFormat("DD-MM-YYYY"));
- cellStyle.setDataFormat(dataFormat.getFormat("MM+DD+YYYY"));

and this didn't work:
- cellStyle.setDataFormat(dataFormat.getFormat("MM/DD/YYYY"));

cheers, michael
Comment 1 Nick Burch 2013-06-05 14:59:15 UTC
Can you clarify what "didn't work" means? Did you get an error? Something else?
Comment 2 Michael 2013-06-06 04:44:12 UTC
Oh sorry,

if i have a look at the custom format for the cell in Excel the '/' is replaced by a '.'.

If i set cellStyle.setDataFormat(dataFormat.getFormat("MM//DD//YYYY")) then i get MM..TT..JJJJ.

In Excel i can set the format MM/TT/JJJJ.

cheers, michael
Comment 3 Javen O'Neal 2016-09-22 03:53:02 UTC
This bug needs a full unit test and possibly a German excel file.