I want to convert a date that I receive as a parameter as follows:
String fecha = "yyyymmdd"; ----- Received as a parameter.
convert it to "yymmdd", i did it with SimpleDateFormat, but it doesn't work for me, it tells me that the conversion is not correct.
I am doing it in java
I attach code of how I am doing it in java
public String findFile(String date) {
SimpleDateFormat sdf = SimpleDateFormat("yymmdd");
String fecha = sdf.format(date);
System.out.println("Formato de fecha: " fecha);
}