I'm working on a java project and I need to send a date format within a URL but the container of date send it with spaces which is impossible so i convert it to a string and I used the replace method to replace the spaces with "" or "-" but it didn't work
Here is the code:
Date date = date_debut.getDate();
String dateconver= date.toString();
String datef= dateconver.replace(" ", "");
And here is the error: incompatible types string can not be converted to char
I have tried also to use replaceAll but the IDE didn't even show it