public static Timestamp getDate(){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
Timestamp time = Timestamp.valueOf(sdf.format(new Date()));
return time;
}
public static void main(String[] args) {
Timestamp t = getDate();
System.out.println(t.toString());
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
Timestamp time = Timestamp.valueOf(sdf.format(new Date()));
return time;
}
public static void main(String[] args) {
Timestamp t = getDate();
System.out.println(t.toString());
}