I\'m facing a very bizarre issue.
While parsing this string 2016-09-06 05:18:06.023 PM
I get the following exception - java.text.ParseException: Unparseable d
It may be possible it can be affected by Symbols For am/pm in device default locale, so try to use locale as below to parse date it will help you.
SimpleDateFormat formatGMT = new SimpleDateFormat("yyyy-MM-dd KK:mm:ss.SSS a", Locale.US);
formatGMT.setTimeZone(TimeZone.getTimeZone("GMT"));
try
{
date = formatGMT.parse("2016-09-06 05:18:06.023 PM");
}
catch (ParseException e)
{
Crashlytics.log(Log.ERROR, "DB Insertion error", e.getMessage().toString());
Crashlytics.logException(e);
e.printStackTrace();
}