xxxxxxxxxx
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("HH:mm");
xxxxxxxxxx
LocalTime time = LocalTime.parse("23:59:59");
DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_TIME;
String value = time.format(formatter);
localdatetime format in java
xxxxxxxxxx
LocalDate today = LocalDate.now();
String formattedDate = today.format(DateTimeFormatter.ofPattern("dd-MMM-yy"));
System.out.println(formattedDate);