Hi, I have a web service that returns a date object like this, as a Json return
"/Date(922312800000+0200)/"
However, I need to show it in text form in this template
"19.12.2011 16:15"
How can I convert this return to this template?
Edit: Here is my code still providing java.lang.IllegalArgumentException
SimpleDateFormat date = new SimpleDateFormat("dd/MM/yy"); String dateText = date.format(tempEntry.getCreatedDate());
Edit: Here is the code that works for me
String dateText = tempEntry.getCreatedDate(); String dateString = dateText.replace("/Date(", "").replace(")/", ""); String[] dateParts = dateString.split("[+-]"); Date dateFormat = new Date(Long.parseLong(dateParts[0]))
source share