How to change LocalDate format resulting into a LocalDate without resulting into a String [duplicate]
问题 This question already has answers here : How to format LocalDate object to MM/dd/yyyy and have format persist (5 answers) How can you make LocalDate to return Date in a specific format? (1 answer) Closed 9 months ago . In a need to convert Java LocalDate of the format of dd-MM-yyyy into a LocalDate of dd/MM/yyyy . Trying with : DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("dd/MM/yyyy"); LocalDate date = // LocalDate value in dd-MM-yyyy format String stringDate = dateFormat