我有一個問題,以改變我得到的迴應DD-MMM-YYYY更改JSON日期格式DD-MMM-YYYY Android中
//json response which i am getting in "mmm-dd-yyyy"
String jsondate = map.get("endDate");
Calendar c = Calendar.getInstance();
//date format which i need the output
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy");
//the json response which i need to set in "dd-mm-yyyy"
viewHolder.end_date.setText(dateFormat.format(c.getTime()));
顯示您的答案@pappya –
你會得到任何錯誤?你卡在哪裏? – SripadRaj
看看:http://stackoverflow.com/questions/4032967/json-date-to-java-date – 476rick