Follow up.
I changed "JSONException" and "ParseException" to "Exception" only and
suddenly everything works.
I am super stoked! Thank you so much for helping out.
On Tuesday, February 23, 2016 at 6:37:05 PM UTC+1, Ralph Bergmann wrote:
>
> Am 23.02.16 um 16:26 schrieb Mark van Limburg:
> > According to the earlier pasted Class file, where would you paste the
> > SimpleDataFormat code?
>
>
> You have this 2 lines in your code
>
> feeds.add(pagefeed.getJSONObject(l).getString("created_time"));
> feeds.add(pagefeed.getJSONObject(l).getString("message"));
>
> changed it to something like this:
>
> SimpleDateFormat formatIn = new SimpleDateFormat("dd-MM-yyyy",
> Locale.ENGLISH);
> SimpleDateFormat formatOut = new SimpleDateFormat("yyyy-MM-dd",
> Locale.ENGLISH);
>
> String created_time =
> pagefeed.getJSONObject(l).getString("created_time");
> Date date = formatIn.parse(created_time);
>
> feeds.add(formatOut.format(date));
> feeds.add(pagefeed.getJSONObject(l).getString("message"));
>
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/89941b50-9c02-457d-90df-1926fcee1737%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.