Java tutorial
//package com.java2s; public class Main { public static String getYearMonthDay2() { java.util.Date date1 = new java.util.Date(); java.sql.Date date3 = new java.sql.Date(date1.getTime()); return date3.toString(); } }