String text = "04 Mar 2019, Mon • 0205 H"; DateFormat df = new SimpleDateFormat("dd MMM yyyy, EEE • HHmm 'H'", Locale.ENGLISH); // Fri Apr 05 2019 try { Date d = df.parse(text);
DateFormat df2 = new SimpleDateFormat("yyyyMMddHHmm"); System.out.print(df2.format(d)); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); }
|