when sending it to the database I get the following error Data truncation: Incorrect date value: 'null' for column 'dateInscription' at row 1 the capture in visit1 String visit1 = request.getParameter ("txtVisita1"); and I send it to the database that is when I get the error.