I want to represent date in the format MM-DD-YYYY as Day, Month Date
For example - represent 5-12-2015
as Tuesday, May 12. How can I do this?
I want to represent date in the format MM-DD-YYYY as Day, Month Date
For example - represent 5-12-2015
as Tuesday, May 12. How can I do this?
Though I am giving you the code to do this, you should first show us your efforts.
String date = "5-12-2015";
DateFormat format = new SimpleDateFormat("MM-dd-yyyy");
Date d = format.parse(date);
DateFormat format1 = new SimpleDateFormat("EEEE, MMM dd");
String finalDateString = format1.format(d);
System.out.println(finalDateString);