Please help in converting double value to date..
807601Jan 22 2008 — edited Jan 27 2008Hi Friends,
I have a double value which I am getting from reading the excel file using Apache POI Classes.
For example: The date in the excel cell is 12/18/2008 and when reading the cell using the POI class it is returning 39800.0
instead of returning the original excel date 12/18/2008.
Basically I need to convert back the double value 39800.0 to 12/18/2008.
Did anybody face issue like this, or is there any other way to get date value from excel files.
I am posting part of my code for reference..
//---------------------------------------------------------------------
public String getCellValues(HSSFCell cell) {
if (cell.getCellType()==0 ) {
return ""+cell.getNumericCellValue();
}
if (cell.getCellType()==1 ) {
return cell.getStringCellValue();
}
return "";
}
//--------------------------------------------------------------------
Thanks in Advance
James George.