I want to remove time from Date
object.
DateFormat df;
String date;
df = new SimpleDateFormat("dd/MM/yyyy");
d = eventList.get(0).getStartDate(); // I'm getting the date using this method
date = df.format(d); // Converting date in "dd/MM/yyyy" format
But when I'm converting this date (which is in String
format) it is appending time also.
I don't want time at all. What I want is simply "21/03/2012".
See Question&Answers more detail:os