It’s because you are using mm
, which stands for minutes. You must use MM
for month
More Related Contents:
- How to format java.util.Date with DateTimeFormatter portable?
- How to convert java.util.Date to java.sql.Date?
- Is java.sql.Timestamp timezone specific?
- java.util.Date vs java.sql.Date
- Convert java.util.Date to what “java.time” type?
- Java 8: Difference between two LocalDateTime in multiple units
- Difference between year-of-era and week-based-year?
- Calendar returns date in wrong time zone
- What is the use of “lenient “?
- Calculating difference in dates in Java
- How to subtract X day from a Date object in Java?
- Convert String to Calendar Object in Java
- Convert a date format in epoch
- In Java, how do I get the difference in seconds between 2 dates?
- Get yesterday’s date using Date [duplicate]
- Java: Convert String to TimeStamp
- How to get the first date and last date of the previous month? (Java)
- How can I “pretty print” a Duration in Java?
- Converting String to Date using SimpleDateFormat is returning random date [duplicate]
- Get integer value of the current year in Java
- Why were most java.util.Date methods deprecated?
- How to transform currentTimeMillis to a readable date format? [duplicate]
- Android calculate days between two dates
- Java Timestamp – How can I create a Timestamp with the date 23/09/2007?
- How to format date string in java? [duplicate]
- Java Best Practice for Date Manipulation/Storage for Geographically Diverse Users
- Time: How to get the next friday?
- Java 8: Calculate difference between two ZonedDateTime
- Date format conversion using Java
- How can I catch Event Dispatch Thread (EDT) exceptions?