android parse date

Solutions on MaxInterview for android parse date by the best coders in the world

showing results for - "android parse date"
Sara
01 Mar 2018
1import java.time.*;
2import java.time.format.*;
3DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
4String input = "2021-02-05 13:07:35";
5LocalDateTime datetime = LocalDateTime.parse(input, formatter);
Kyllian
06 Aug 2019
1import java.time.*;
2import java.time.format.*;
3DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
4String input = "13:07:35";
5LocalTime time = LocalTime.parse(input, formatter);