1String str = "1986-04-08 12:30";
2DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
3LocalDateTime dateTime = LocalDateTime.parse(str, formatter);
4
1String dateTime = "1995-07-25 15:03:45";
2DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
3LocalDateTime date = LocalDateTime.parse(dateTime, dateTimeFormatter);