How to convert Date to LocalDateTime in Java 8 - Example Tutorial

The LocalDateTime class has introduced in Java 8 to represents both date and time value. It's local, so date and time is always in your local time zone. Since java.util.Date has been widely used everywhere in many Java applications, you will often find yourself converting java.util.Date to LocalDate, LocalTime and LocalDateTime classes of java.time package. Earlier I have shown you how to convert Date to LocalDate and today, I am going to teach you how to convert Date to LocalDateTime in Java 8. The approach is same. Since the equivalent class of java.util.Date in new Date and Time API is java.time.Instant, we first convert Date to Instance and then create LocalDateTime instance from that Instant using System's default timezone.
Read more »