📜  android 解析时间 - Java 代码示例

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

代码示例1
import java.time.*;
import java.time.format.*;
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
String input = "2021-02-05 13:07:35";
LocalDateTime datetime = LocalDateTime.parse(input, formatter);