java.util.Date date= new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(date);
int month = cal.get(Calendar.MONTH);
More Related Contents:
- How to calculate remaining days of the month? [duplicate]
- How do I calculate someone’s age in Java?
- Calendar date to yyyy-MM-dd format in java
- How to tackle daylight savings using TimeZone in Java
- java Calendar, Date, and Time management for a multi-timezone application
- How to convert a date String to a Date or Calendar object?
- Java: How do you convert a UTC timestamp to local time?
- How to subtract X day from a Date object in Java?
- System.currentTimeMillis() vs. new Date() vs. Calendar.getInstance().getTime()
- Convert String to Calendar Object in Java
- Java Date year calculation is off by year for two days
- How to check if a date Object equals yesterday?
- Java Date vs Calendar
- Why does Java’s Date.getYear() return 111 instead of 2011?
- Why does Java’s Date.getYear() return 111 instead of 2011?
- Get Last Friday of Month in Java
- how to add days to java simple date format
- Getting last day of the month in a given string date
- Android Days between two dates
- How to sanity check a date in Java
- Sum two dates in Java
- Converting a Date object to a calendar object [duplicate]
- Why is the month changed to 50 after I added 10 minutes?
- Retrieve current week’s Monday’s date
- Is there a good way to get the date of the coming Wednesday?
- Date object to Calendar [Java]
- java: how to mock Calendar.getInstance()?
- java get the first date and last date of given month and given year [duplicate]
- calculate business days including holidays
- How to save and retrieve Date in SharedPreferences