How can i have my date to show like 26-10-1994
?
if i print this out it will show 1994-10-26
for some wierd reason. anyone have some tips on how to fix this? i've tried local_root but that didnt help either.
private String geboortedatum = "26-10-1994";
public LocalDate calculateAge() {
DateTimeFormatter sdf = DateTimeFormatter.ofPattern("dd-MM-yyyy");
LocalDate dob = LocalDate.parse(geboortedatum, sdf);
System.out.println("dob = " + dob);
return dob;
}