For Example I have the date: \"23/2/2010\" (23th Feb 2010). I want to pass it to a function which would return the day of week. How can I do this?
I
String input_date="01/08/2012"; SimpleDateFormat format1=new SimpleDateFormat("dd/MM/yyyy"); Date dt1=format1.parse(input_date); DateFormat format2=new SimpleDateFormat("EEEE"); String finalDay=format2.format(dt1);
Use this code for find the Day name from a input date.Simple and well tested.