|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.hssf.usermodel.HSSFDateUtil
Contains methods for dealing with Excel dates.
Method Summary | |
static double |
getExcelDate(java.util.Date date)
Given a Date, converts it into a double representing its internal Excel representation, which is the number of days since 1/1/1900. |
static java.util.Date |
getJavaDate(double date)
Given a excel date, converts it into a Date. |
static java.util.Date |
getJavaDate(double date,
boolean use1904windowing)
Given an Excel date with either 1900 or 1904 date windowing, converts it to a java.util.Date. |
static boolean |
isCellDateFormatted(HSSFCell cell)
Check if a cell contains a date Since dates are stored internally in Excel as double values we infer it is a date if it is formatted as such. |
static boolean |
isInternalDateFormat(int format)
given a format ID this will check whether the format represents an internal date format or not. |
static boolean |
isValidExcelDate(double value)
Given a double, checks if it is a valid Excel date. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static double getExcelDate(java.util.Date date)
date
- the Date
public static java.util.Date getJavaDate(double date)
date
- the Excel Date
getJavaDate(double,boolean)
public static java.util.Date getJavaDate(double date, boolean use1904windowing)
date
- The Excel date.use1904windowing
- true if date uses 1904 windowing,
or false if using 1900 date windowing.
public static boolean isInternalDateFormat(int format)
public static boolean isCellDateFormatted(HSSFCell cell)
isInternalDateFormat(int)
public static boolean isValidExcelDate(double value)
value
- the double value
|
jakarta-poi 1.10.0-dev | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |