Format a date using the new date time API

LocalDate represents just a date, not a DateTime. So “HH:mm:ss” make no sense when formatting a LocalDate. Use a LocalDateTime instead, assuming you want to represent both a date and time.

Leave a Comment