Try this,
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
DateFormat outputformat = new SimpleDateFormat("yyyy-MM-dd hh:mm aa");
Date date = null;
try
{
date = df.parse(listData.get(position).get("datetime"));
strDateTime = outputformat.format(date);
}
catch (Exception e)
{
e.printStackTrace();
}
If you need the output like this --> 1/1/2015
just change the formatted method d/m/yyyy
DateFormat outputformat = new SimpleDateFormat("d/m/yyyy");
All the date format, visit this link:
http://developer.android.com/reference/java/text/SimpleDateFormat.html