I'm trying to get a date from calendar view:
calendar = (CalendarView) findViewById(R.id.calendarView);
by trying:
String selectedDate = calendar.getDate().toString();
But am getting error saying that toString()
method can not be resolved
I would like to further get it in a format of "DD/MM/YYYY"
You should use SimpleDateFormat
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
String selectedDate = sdf.format(new Date(calendar.getDate()));