Here you can find the source of toDate(LocalDate localDate)
public static java.sql.Date toDate(LocalDate localDate)
//package com.java2s; //License from project: BSD License import java.sql.Timestamp; import java.time.*; public class Main { /**/*from www .j a v a 2 s . c o m*/ * Convert a LocalDate to a Date. Returns null on null input. */ public static java.sql.Date toDate(LocalDate localDate) { if (localDate == null) return null; return java.sql.Date.valueOf(localDate); } /** * Convert a LocalDateTime to a Date. Returns null on null input. */ public static Timestamp toDate(LocalDateTime localDateTime) { if (localDateTime == null) return null; return Timestamp.valueOf(localDateTime); } }