0

How to convert java util date into java.time LocalDate type.java.time is int the JDK 1.8 version.

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
Kavinda Gehan
  • 4,668
  • 2
  • 17
  • 20

1 Answers1

0

Try this:

Date inputDate = new Date();
LocalDate date = inputDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();

I found this duplicated post after answer: Convert java.util.Date to java.time.LocalDate

Community
  • 1
  • 1
Andynedine
  • 441
  • 5
  • 20