I have a String
variable that contains a date.
I just want to switch the format.
Here's my Code:
String date = jobItems.get(position).get(job_deadline);
SimpleDateFormat df = new SimpleDateFormat("dd.MM.yyyy",Locale.getDefault());
String newDate = null;
newDate = df.format(Date.parse(date));
date has = 2015-08-17
and I want to change it to = 17.08.2015
My example doesn't work. Also the method Date.parse
seems to be deprecated.
How can I change the format on a simple way?
Kind Regards!
EDIT:
Thats not a duplicate of that Thread because I'm not using .NET or VB