I'm quite new to the Java and for the use case I would like to know how to convert String "2023-02-01" into "02012023" I had troubles understanding the correct usage of SimpleDateFormat for this case
So far I tried nothing
SimpleDateFormat
is legacy now, try to use the modern java.time
library instead:
String newStringDate = LocalDate.parse("2023-02-01")
.format(DateTimeFormatter.ofPattern("MMdduuuu"));