I have date picker in my application and its works well .But I need selected day of week instead of date (i.e., if I select the date 23 I need to get day like \"friday\" ins
change your code as for getting day of week using SimpleDateFormat
:
private DatePickerDialog.OnDateSetListener
datePickerListener = new DatePickerDialog.OnDateSetListener()
{
public void onDateSet(DatePicker view, int selectedYear,
int selectedMonth, int selectedDay)
{
SimpleDateFormat simpledateformat = new SimpleDateFormat("EEEE");
Date date = new Date(selectedYear, selectedMonth, selectedDay-1);
String dayOfWeek = simpledateformat.format(date);
}
}