error(java.text.ParseException: Unparseable date: "Nov 2 2017 09:44:00:000AM")
This is my code i use this on fragment
String tanggal = dataObject.getString("tgl_periksa");
DateFormat readFormat = new SimpleDateFormat("MM dd yyyy HH:mm:ss:SSSa");
DateFormat writeFormat = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss");
Date date = null;
try {
date = readFormat.parse( tanggal );
} catch ( ParseException e ) {
e.printStackTrace();
}
String formattedDate = "";
if( date != null ) {
formattedDate = writeFormat.format( date );
}