4.在Java中将String型转换成Date型
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { Date date = format.parse("2011-05-19 16:19:19"); } catch (ParseException e) { e.printStackTrace(); }