0

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

MadProgrammer
  • 323,026
  • 21
  • 204
  • 329
Kavinda Gehan
  • 4,136
  • 2
  • 14
  • 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
  • 443
  • 5
  • 19