List of utility methods to do SQL LocalDate
LocalDate | getLocalDate() get Local Date return getLocalDateTime().toLocalDate();
|
LocalDate | getLocalDateFromUtilDate(Date input) get Local Date From Util Date return input.toLocalDate();
|
java.sql.Date | getSqlDate(java.util.Date paramDate) get Sql Date java.sql.Date localDate = new java.sql.Date(paramDate.getTime()); return localDate; |
void | setDate(PreparedStatement s, int col, LocalDate ld) set Date if (ld == null) { s.setNull(col, Types.DATE); } else { s.setDate(col, java.sql.Date.valueOf(ld)); |
java.sql.Date | toDate(LocalDate localDate) Convert a LocalDate to a Date. if (localDate == null) return null; return java.sql.Date.valueOf(localDate); |
Date | toDate(LocalDate localDate) to Date return Date.valueOf(localDate);
|
Date | toDate(LocalDate localDate) to Date if (localDate == null) { return null; return new Date(Date.from(localDate.atStartOfDay(ZoneOffset.systemDefault()).toInstant()).getTime()); |
Instant | toInstant(Date date) to Instant return date.toLocalDate().atStartOfDay(ZoneOffset.UTC).toInstant();
|
java.util.Date | toJavaDate(DateMidnight dm) to Java Date java.util.Date d = (dm == null ? null : new java.util.Date(dm.getMillis())); return d; |
Date | toJDBC(LocalDate fecha) Convierte la fecha en el formato de Joda-Time al equivalente en el formato de JDBC java.sql.Date return fecha == null ? null : new Date(fecha.toDateMidnight().getMillis()); |