Skip to Content
0
Former Member
Nov 28, 2006 at 03:27 AM

error in excel uploading

31 Views

Hi All,

i am accessing an excel file which has date in one of its filed in the format "DD/MM/YYYY" and this field is taken as numeric field when i execute the following code

if (cell13.getCellType() == cell13.CELL_TYPE_NUMERIC)

{

Cellvalue = String.valueOf(cell13.getNumericCellValue());

}

String temp = Cellvalue.substring(6,10) + "-" + Cellvalue.substring(3,5) + "-" + Cellvalue.substring(0,2);

java.sql.Date issuedt = java.sql.Date.valueOf(temp) ;

user_details.setPRJ_EN_DATE(issuedt);

the value in the variable "Cellvalue" is some integeral value coz of which substring function gives an error.