I have created a file named tablenew.xls which has date with following code:
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date date = (Date)formatter.parse(st[length]);
datecell=new DateTime(tokenNumber,lineNumber,date);
sheet.addCell(datecell);
I am getting the output in my file as "04-03-11" which is "dd-MM-yy". However when this same date is written to another file named tabletemp.xls with the same code , i get the output as something like -689881.5. My dilemma is that the my program however, seems to understand this negative value as a date. Should i modify my code? if so, then what should i do? thanks in advance