I have a String that receives the following date format (yyyy-MM-dd ...)
"2023-03-13 12:00:02"
and i need to change the format to the following (dd-MM-yyyy ...)
"13-03-2023 12:00:02.000000000"
I tried to build the following method but it doesn't work and I don't have much idea how it should be
String formatoFechaFinBd(String dateService) throws ParseException {
Date date = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").parse(dateService);
String formattedDate = new SimpleDateFormat("dd/MM/yyyy, Ka").format(date);
return formattedDate;
}
How can I do the conversion I need to get that date format in the String