This is bit tricky. Those familiar with Java, please ignore. Those not, please continue reading how to fix date format using java. Here challenge is that we have fetched record from mySQL Database. Here date is typically stored in yyyy-mm-dd hh:ii:ss format. Ex. 2021-01-26 12:22:31 The logical flow is important to understantd. 1. MySQL returns a string as date. 2. We convert this strDate to Date Format. 3. Now we change the date format to desired formatting. 4. Next we convert the date to string again. 5. Finally we return the newly formatted date string. The code blocks:- String dateCreated = "2021-01-26 12:22:05"; String formattedDate = null ; try { formattedDate = getFormattedDate (dateCreated); } catch (ParseException e) { e.printStackTrace(); } Toast.makeText(this, formattedDate,LENGTH_SHORT).show(); /* Now create a function */ public static String getFormattedDate(String strDate) throws ParseException { Date date = new SimpleDateFormat( "yyyy-MM-dd ...