0

So there is my problem- i am using this format to convert my string into a date :

SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zZ yyyy", Locale.US);

and there is the code that i am trying to convert with him ("s" is an object of mine , and setBirthday is function that initialize my date variable):

 s.setbirthday(dateFormat.parse(myDateString));

myDateString(the one i want convert to date ) has the next value (which is String) : -"Sun Jan 12 00:00:00 UTC 1913 " .

So any time i a trying to run the program i am getting this exception :

java.text.ParseException: Unparseable date: "Sun Jan 12 00:00:00 UTC 1913"

I looked on other threads here but no one helped me so far.

Thanks in advance!

Tal
  • 235
  • 5
  • 13

0 Answers0