Here you can find the source of toSQLDate(DateMidnight dm)
public static java.sql.Date toSQLDate(DateMidnight dm)
//package com.java2s; //License from project: Apache License import org.joda.time.DateMidnight; import org.joda.time.LocalDate; public class Main { public static java.sql.Date toSQLDate(DateMidnight dm) { // TODO - confirm this conversion always works, esp. across timezones java.sql.Date d = (dm == null ? null : new java.sql.Date(dm.getMillis())); return d; }/* ww w .ja v a2s . c om*/ public static java.sql.Date toSQLDate(LocalDate ld) { // TODO - confirm this conversion always works, esp. across timezones java.sql.Date d = (ld == null ? null : new java.sql.Date(ld.toDateTimeAtStartOfDay().getMillis())); return d; } }