Converting Number representation of Date in excel to Date in java

前端 未结 4 493
暖寄归人
暖寄归人 2020-11-30 10:05

I have date column in excel, but when I\'m reading in my java application I\'m getting value as number

Example

Excel Date

1/1/2013

4条回答
  •  渐次进展
    2020-11-30 10:39

    Apache POI has some utilities for that http://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/DateUtil.html, notably http://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/DateUtil.html#getJavaDate(double)

    Note Excel stores dates as the number of days (plus fractional days) since 1900 (and in some cases it can be from 1904). See http://support.microsoft.com/kb/180162.

提交回复
热议问题