String日期与LocalDateTime互转
String strDate="2018-01-03 18:06:36";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
//String日期转LocalDateTime
LocalDateTime d = LocalDateTime.parse(strDate,formatter);
System.out.println(d);
//LocalDateTime转String日期
String sd = formatter.format(d);
System.out.println(sd);