I am displaying the date and time in Android with this format: 2013-06-18 12:41:24
How can I change it to the following format? 18-j
Use this code like below:
SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy hh:mm a"); String date = formatter.format(Date.parse("Your date string"));
Hope it will help you.