I have a calendar object in my Java program. How I can get the day of date from this?
How to get day from date in Java using Calendar?
Hi, If you don't have calendar object then you should first create it and then you can easily get the day of week from this.
Following program works very well:
int weekday = calendar.get(Calendar.DAY_OF_WEEK);
You can also check this tutorial Find Day of Month for more details.