Java parse Data string Android

view story

http://stackoverflow.com – i'm trying to parse a String using Java SimpleDateFormat. My String is : 2/23/2013 10:12:52 PM As oracle Javadoc, i wrote the following patter: MM/dd/yyyy KK:mm:ss a IMHO i'm not sure about the PM(aa), i tryied also only 'a' or 'aaa' but i always get a ParseException. The funny thing is that when running it on a test project as a java application, it works: When i run it in an android project, it doesn't work: SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy KK:mm:ss a"); try { Date data = formatter.parse("2/23/2013 10:12:52 PM"); System.out.print (HowTos)