Java examples for java.sql:Date
add to java.sql.Date via LocalDate
//package com.java2s; import java.sql.Date; import java.time.LocalDate; public class Main { public static Date add(Date awal, int i) { LocalDate localDate = awal.toLocalDate(); LocalDate newDate = localDate.plusDays(i); return toDate(newDate); }/* ww w .ja v a 2 s.com*/ public static Date toDate(LocalDate localDate) { return Date.valueOf(localDate); } }