I have:
String date = "05051990";
I need to parse it to a java.time.LocalDate in a format "dd. MM yyy."
java.time.LocalDate
I cant seem to make it work, please help!!
Try this:
String date="05051990"; LocalDate localDate = LocalDate.parse(date, DateTimeFormatter.ofPattern("ddMMyyyy")); date = localDate.format(DateTimeFormatter.ofPattern("dd. MM yyyy")); System.out.println(date);
1.4m articles
1.4m replys
5 comments
57.0k users