I'm new to programming. How can I remove the zero next to the date (2022-04-21 00:00:00.000000)?

here is my code:

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String date = sdf.format(jDateChooser1.getDate());
((JTextField)jDateChooser1.getDateEditor().getUiComponent()).setText(date);
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
model.addRow(new Object[]{date});
pst.setString(7, date);
0

There are 0 best solutions below