jxl导入excel中日期格式问题 excel中的一列日期类型的数据,例2008-9-13,可用jxl读取的时候就变成08-9-13了,请问这个怎么让他取出来的时候变成2008-09-13? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果取出来确定是日期类型 自己用dateformat格式化就行了吧 你的format没设对String format = "yyyy-MM-dd";SimpleDateFormat stf = new SimpleDateFormat(format); String stringValue = stf.format(cellValue); 看这个: SimpleDateFormat stf = new SimpleDateFormat("yyyy-MM-dd"); String stringValue = stf.format(cellValue);System.out.print(stringValue); 方法1:采用SimpleDateFormat进行转换方法2:采用org.jxl.date 来进行CELL的读取,然后获取Time,封装到Date中 自己format一下被 自己控制 Dateformat我刚学时间时,天天Dateformat java类如何向下转型 TableRowSorter 排序问题? String a = null; a.equals("abc")为什么会报空指异常? 请教一个问题。在线等 对象数组问题 sleep()方法怎么会知道到底是哪个线程在调用它?? 用java做过server的高人请进,分数不是问题,只要能给个提示。 一个非常简单的问题 初学者问题:Tomcat中beans 缺省目录在那儿? 请问,这个是类型的项目工程? java.io.IOException: CreateProcess: 求助 集合
String format = "yyyy-MM-dd";SimpleDateFormat stf = new SimpleDateFormat(format);
String stringValue = stf.format(cellValue);
SimpleDateFormat stf = new SimpleDateFormat("yyyy-MM-dd");
String stringValue = stf.format(cellValue);
System.out.print(stringValue);
方法2:采用org.jxl.date 来进行CELL的读取,然后获取Time,封装到Date中
我刚学时间时,天天Dateformat