Here you can find the source of setDate(PreparedStatement s, int col, LocalDate ld)
public static void setDate(PreparedStatement s, int col, LocalDate ld) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Types; import java.time.LocalDate; public class Main { public static void setDate(PreparedStatement s, int col, LocalDate ld) throws SQLException { if (ld == null) { s.setNull(col, Types.DATE); } else {/*from w ww . j a v a 2s.c o m*/ s.setDate(col, java.sql.Date.valueOf(ld)); } } }