String类型日期转换成Date类型。。。。
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String time="2012-01-04";
Date t = sdf.parse(time);
以上代码为什么不对,难道parse这个方法不能用了吗????
发布时间: 2013-02-19 11:11:40 作者: rapoo
String类型日期转换成Date类型。。。。
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String time="2012-01-04";
Date t = sdf.parse(time);
以上代码为什么不对,难道parse这个方法不能用了吗????