📜  格式化 localdatetime - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:42.456000             🧑  作者: Mango

代码示例2
String dateTime = "1995-07-25 15:03:45";
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime date = LocalDateTime.parse(dateTime, dateTimeFormatter);