This content has been marked as final. Show 5 replies
where date is a Date object retrieved directly from
JXDatePicker but cal.DAY_OF_WEEK always returns value
for current date (it means for today).
How can I set up Calendar object using Date or String
in order to get day of week?
Do you literally mean cal.DAY_OF_WEEK? That's a constant declared to have the value 7, a piece of information that shuoldn't be of concern to you.
I would have expected this to work:
cal.setTime(<date>); int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);