I try to convert String to Date.
Here is my code:
SimpleDateFormat format = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss zzz yyyy\");
Date da
SimpleDateFormat is Locale specific. At least the pattern E
and M
are locale specific, because for example "Sun" or "Sunday" will not match for Locale.GERMAN or Locale.FRENCH etc. You better specify the used Locale
SimpleDateFormat format = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
or use a format, which is not locale specific.