On 18 August 2011 16:45, bob <b...@coolgroups.com> wrote: > I'm using this code to try to parse a date: > > Date myDate = DateFormat.getDateInstance().parse(s); > > However, I get this: > > java.text.ParseException: Unparseable date: Sun, 19 Jun 2011 02:28:34 > -0500 > > Any ideas how I can easily parse a date in that format?
Your code expects the String s to be in the DEFAULT format for your platform (locale), which probably differs from the one you are passing in. To check, what is the default format, call the following: String dateInDefaultFormat = DateFormat.getDateInstance().format(new Date()); -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en