I have the attribute type Date
in a class and when I want to register it in MySQL
with type date
, I get an error and it may be due to the format of the date, but I do not know what to do.
Class attribute:
private Date fecha;
Method in the controller:
this.jdbcTemplate.update ( "insert into usuarios (nombre,correo,fecha ) values (?,?,?)", u.getNombre(),u.getCorreo(),u.getFecha() );