Convert Java Date to Mysql Date
public static String toMysqlDateStr(Date date){
if (date==null)
return "NULL";
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return '\''+sdf.format(date)+'\'';
}
Comments