Java examples for java.time:Instant
LocalDate to Java Date via Instant
//package com.java2s; import java.time.Instant; import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; public class Main { public static Date toJavaDate(LocalDate localDate) { Instant localDateInstant = Instant.from(localDate.atStartOfDay() .atZone(ZoneId.systemDefault())); return Date.from(localDateInstant); }/*w w w . j av a 2s. co m*/ }