I am trying to parse a Date like this:
THU 04/04 – 1PM PST
I have tried different patterns, and currently I have this one:
SimpleDateFormat formatoFechaHora = new SimpleDateFormat("EEE dd/MM - ha z");
Date daa=formatoFechaHora.parse("THU 04/04 - 1PM PST");
This throws an exception:
java.text.ParseException: Unparseable date: “Thu 02/07 – 1PM PST” (at
offset 0)
What is the right pattern to parse this?
your should be
EEE dd/MM - ha znote that
EEEis for the dayTHUandyyyyis for year like 2013.EDIT:
you probably need to set your Locale to ENGLISH explicitly.