
hi guys , iam trying to read excel sheet data using apache poi api .my problem is i cant read the date(dd/mm/yy) and time(hh:mm:ss) values concurrently from two different cells .when iam trying to do so iam getting the values in either time format or data format but not both the below is the sample code please post your answers with sample code
if (HSSFDateUtil.isCellDateFormatted(cell)) { // format in form of M/D/YY
cal.setTime(HSSFDateUtil.getJavaDate(num)); cellText = (String.valueOf(cal.get(Calendar.YEAR))).substring(2); cellText = cal.get(Calendar.MONTH)+1 + ?/? +cal.get(Calendar.DAYOFMONTH) + ?/? +cellText;
// cal.setTime(cell.getDateCellValue());
datetext = cal.get(Calendar.HOUR) + ?:? +cal.get(Calendar.MINUTE) + ?:? +cal.get(Calendar.SECOND);
}

i am also having the same problem..plz if someone can help..help me
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.