I want to get the CreateDate value from xml file
the xml file is like this way.
<d:CreateDate m:type="Edm.DateTime">2012-03-18T15:11:30.403</d:CreateDate>
I created JSONObject as
JSONObject json=new WCFServices().getWhatsNew();//i get the json object WCFServices class.
JSONArray whatsnew= json.getJSONArray("d");
String CreateDate= c.getString("CreateDate");
if i try to print the value it gives me output as:
/Date(1330041600000)/
I want to get the value as like 2012-03-18T15:11:30.403
how to get it ?
I think your output is in epoch date format. So you need to convert it to normal date time. Try this for it..
You can find more about DateFormat by following links, It will help you to retrieve output in different formats.
http://developer.android.com/reference/java/text/SimpleDateFormat.html
http://developer.android.com/reference/android/text/format/DateFormat.html
Hope this will help you..And don’t forget to accept this if it help you.
Thanks…