Good afternoon, I read the following line from the file, trying to convert to type Date. Does not work. Tell me, please, what is the error.
String dat ="Sat Jan 03 19:47:23 MSK 1984"; SimpleDateFormat simpleDateFormat = new SimpleDateFormat(); simpleDateFormat.applyPattern("EEE MMM dd HH:mm:ss zzz yyyy"); Date birthDate = simpleDateFormat.parse(dat); Throws out such an error:
Exception in thread "main" java.text.ParseException: Unparseable date: "Sat Jan 03 19:47:23 MSK 1984" at java.text.DateFormat.parse(DateFormat.java:366)
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ENGLISH);? - Yuriy SPb ♦