Change the pattern string from “yyyy/MM/DD” to “yyyy/MM/dd”
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
More Related Contents:
- How to parse a date? [duplicate]
- How do you format the day of the month to say “11th”, “21st” or “23rd” (ordinal indicator)?
- How to parse dates in multiple formats using SimpleDateFormat
- Java SimpleDateFormat(“yyyy-MM-dd’T’HH:mm:ss’Z'”) gives timezone as IST
- SimpleDateFormat and locale based format string
- SimpleDateFormat parsing date with ‘Z’ literal [duplicate]
- Convert String Date to String date different format [duplicate]
- How to convert a String to a Date using SimpleDateFormat?
- How does Java “week year” really work?
- Date object SimpleDateFormat not parsing timestamp string correctly in Java (Android) environment
- Date format parse exception – “EEE MMM dd HH:mm:ss Z yyyy” [duplicate]
- SimpleDateFormat ignoring month when parsing
- 12:xx shown as 00:xx in SimpleDateFormat.format(“hh:mm:ss”)
- Authenticating against Active Directory with Java on Linux
- Convert String to Calendar Object in Java
- Comparing time is incorrect when picking 12:00
- Generic support for ISO 8601 format in Java 6
- Converting String to Date using SimpleDateFormat is returning random date [duplicate]
- What are the date formats available in SimpleDateFormat class?
- SimpleDateFormat.parse() ignores the number of characters in pattern
- how to add days to java simple date format
- Java: Date parsing, why do I get an error
- How to format date string in java? [duplicate]
- How to Parse Date from GMT TimeZone to IST TimeZone and Vice Versa in android
- How to disable or highlight the dates in JCalendar
- Is there a date format to display the day of the week in java?
- SimpleDateFormat with German Locale – Java 8 vs Java 10+
- How to connect with Java into Active Directory
- Is SimpleDateFormat in Java work incorrect or I did any mistake? See code sample [duplicate]
- Java SimpleDateFormat pattern for W3C XML dates with timezone [duplicate]