SimpleDateFormat formatter new SimpleDateFormat yyyy-MM-dd formatter s

1
2
3
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
formatter.setLenient(false);
Date inputHolStart = formatter.parse(JOptionPane.showInputDialog("Enter holStart (date yyyy-MM-dd):"));