Get The Week Day From A Calendarview In Android
I have implemented a calendarview in my project, i can get the day of the month, the month and the year, but i cant find any method to get the day of the week, my code is this:
Solution 1:
You could always use the Calendar and set it through the time you get from the calendar view:
Calendar selected = Calendar.getInstance();
selected.setTimeInMillis(view.getDate());
int dayOfWeek = selected.get(Calendar.DAY_OF_WEEK);
Each of the int values correspond to one of the days, for example Calendar.TUESDAY = 3
Hope it helps
Post a Comment for "Get The Week Day From A Calendarview In Android"