Home > OS >  How to convert Date 2022-02-02 (yyyy-dd-MM) to 02-Feb-2022 in Java?
How to convert Date 2022-02-02 (yyyy-dd-MM) to 02-Feb-2022 in Java?

Time:03-24

Date 2022-02-02 (yyyy-dd-MM) to 02-Feb-2022 in Java

need help in converting Date 2022-02-02 to format 02-Feb-2022

CodePudding user response:

LocalDate.parse("2022-02-02", DateTimeFormatter.ofPattern("yyyy-dd-MM")).format(DateTimeFormatter.ofPattern("dd-MMM-yyyy"));
  •  Tags:  
  • java
  • Related