String bir = "2020-02-02"; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Date date = null; try { date = sdf.parse(bir); java.sql.Date birDate = new java.sql.Date(date.getTime()); System.out.println(birDate); } catch (ParseException e) { e.printStackTrace(); }