I'm trying to get the day of the week such as "friday" from a string "2015-02-24" in java but is it possible?
There is a code to convert string, however, I want to get the day string from "2015-02-24". Since, I'm a noob I would be glad to have some tips.
SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy");
String dateInString = "7-Jun-2013";
try {
Date date = formatter.parse(dateInString);
System.out.println(date);
System.out.println(formatter.format(date));
} catch (ParseException e) {
e.printStackTrace();
}