case HSSFCell.CELL_TYPE_NUMERIC: double d = cell.getNumericCellValue(); // test if a date! if (HSSFDateUtil.isCellDateFormatted(cell)) { // format in form of M/D/YY cal.setTime(HSSFDateUtil.getJavaDate(d)); cellText = (String.valueOf(cal.get(Calendar.YEAR))).substring(2); cellText = cal.get(Calendar.MONTH)+1 + "/" + cal.get(Calendar.DAY_OF_MONTH) + "/" + cellText; }
|