I have a string like "2017-05-22 12:57:46.688" from which I have to separate date and want to change it's format like "dd/MM/yyyy"and set it to a textview.
Code is as below:
String transactionDate = post.getString(CEarningHistory.TRANSACTION_CTS);
String[] parts = transactionDate.split(" ");
SimpleDateFormat input = new SimpleDateFormat(parts[0]);