I am making an appointment app and am trying to get only the time of the appointment to fill into a combobox. So far I was able to get just the date, but now I am having trouble with receiving just the time. It shows up as yyyy-MM-dd HH:mm in the combobox. The code in question are the last two statements. The modifyDate successfully prints only the date, but I just can't seem to figure out how to separate the date off and print just the time. I tried to create another DateTimeFormatter with HH:mm but that did not work. Thank you so much!
This setAppointment is what puts the data from an existing appointment into the modify screen:
public void setAppointment(Appointment appointment, int index) {
selectedAppointment = appointment;
selectedIndex = index;
Appointment newAppointment = (Appointment) appointment;
DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
this.modifyContactNameText.setText(newAppointment.getContact());
this.modifyTitleText.setText((newAppointment.getTitle()));
this.modifyURLText.setText((newAppointment.getUrl()));
this.modifyTypeText.setText((newAppointment.getType()));
this.modifyDescriptionComboBox.setValue((newAppointment.getDescription()));
this.modifyLocationComboBox.setValue((newAppointment.getLocation()));
this.modifyDate.setValue(LocalDate.parse(newAppointment.getStart(), format));
this.modifyStartComboBox.getSelectionModel().select(newAppointment.getStart(), format));
this.modifyEndComboBox.getSelectionModel().select(newAppointment.getEnd(), format));