字符串格式为yyyyMMdd hhmmss,如何转换为datetime型的:yyyy-MM-dd hh:mm:ss
假设字符串为20120208 091033, 转为datetime型的2012-02-08 09:10:33
------解决方案--------------------------------------------------------
Google下啥都有了 =_=
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd HHmmss");
Date dd = sdf.parse("20120208 091033");
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
System.out.println(formater.format(dd));