public static void main(String Args[]) { String text = "รar, 11 Eyl 2013 19:28:14 +03:00"; try { Date sdf = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss", new Locale("tr")).parse(text); SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String date = DATE_FORMAT.format(sdf); System.out.println(date); } catch (ParseException ex) { Logger.getLogger(test.class.getName()).log(Level.SEVERE, null, ex); } }
source share