I receive string from a server that contains date in this format (2014-06-04 10:26:06).
I want to convert it to date and apply this date format to it
SimpleDateFormat longDateFormat = new SimpleDateFormat("dd MMMM yyyy");
This is what i have at the moment, but its not working.
String formattedDate = longDateFormat.format(messageGSON.getCreated());
viewHolder.textViewMessageDate.setText(formattedDate);
I cant seem to find a solution, i think im missing a a step there