login about faq

i wrote this:

String RFC822_DATE_FORMAT = "EEE, dd MMM yyyy HH:mm:ss Z";
DateFormat formatter = new SimpleDateFormat(RFC822_DATE_FORMAT);
CkString ckString    = new CkString();
...
actCkMail.get_EmailDateStr(ckString);
...formatter.parse(ckString.getString());

but i got:

java.text.ParseException: Unparseable date: "Thu, 16 Apr 2015 14:45:08 GMT"

What i have to do instead?

asked May 26 '15 at 10:28

Howard's gravatar image

Howard
156


Okay ... for all they need this:

....new SimpleDateFormat(RFC822_DATE_FORMAT, Locale.ENGLISH);

the Locale is the Key :-)

link

answered May 26 '15 at 10:57

Howard's gravatar image

Howard
156

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×184
×45
×12

Asked: May 26 '15 at 10:28

Seen: 708 times

Last updated: May 26 '15 at 10:57

powered by OSQA