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 2012/11/15 18:55:52 UTC

[Bug 54149] New: cell.getDateCellValue()

https://issues.apache.org/bugzilla/show_bug.cgi?id=54149

          Priority: P2
            Bug ID: 54149
          Assignee: dev@poi.apache.org
           Summary: cell.getDateCellValue()
          Severity: normal
    Classification: Unclassified
                OS: Windows XP
          Reporter: spyguy@hawaii.rr.com
          Hardware: PC
            Status: NEW
           Version: unspecified
         Component: XSSF
           Product: POI

If you use the cell.getDateCellValue() function to extract a date from an Excel
spreadsheet the month value is -1.  In other words January = 0 .... December =
11.  All the other parts of the dates covert fine only the month is incorrect. 
If in an Excel cell there is a date March 15, 2012 08:32:27 and I call
cell.getDateCellValue().toString I will get a string March 15, 2012 08:32:27. 
However, in the code java.util.Date dateObj = cell.getCellDateValue(); 
dateObj.getMonth(); the getMonth() will return a 2 for March.

-- 
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 54149] cell.getDateCellValue()

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

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
java.util.Calendar and friends follow the C convention, and use 0 based months

See the http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Calendar.html
javadocs for details

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