Konversi String ke SQL Tanggal di Java
SimpleDateFormat sdf1 = new SimpleDateFormat("dd-MM-yyyy");
Fancy Flatworm
SimpleDateFormat sdf1 = new SimpleDateFormat("dd-MM-yyyy");
public class MainClass {
public static void main(String[] args) {
java.util.Date utilDate = new java.util.Date();
java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());
System.out.println("utilDate:" + utilDate);
System.out.println("sqlDate:" + sqlDate);
}
}