I have a string with this value, for example: \"20130211154717\" I want it to be like \"2013-02-11 15:47:17\". How can I do that?
You can use regular expressions for that:
String formattedDate = plainDate.replaceFirst( "(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3 $4:$5:$6");
Though, I like assylias's SimpleDateFormat answer better. :-)
SimpleDateFormat