How about:
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
System.out.println(dateFormat.format(dateFormat.parse("31/05/2011")));
> 31/05/2011
More Related Contents:
- How to calculate remaining days of the month? [duplicate]
- Converting ISO 8601-compliant String to java.util.Date
- Why is the Java date API (java.util.Date, .Calendar) such a mess?
- How can I change the date format in Java? [duplicate]
- What is this date format? 2011-08-12T20:17:46.384Z
- How to convert currentTimeMillis to a date in Java?
- java Calendar, Date, and Time management for a multi-timezone application
- Should I use Java date and time classes or go with a 3rd party library like Joda Time?
- how to convert milliseconds to date format in android?
- JSF convertDateTime renders the previous day
- How to convert a date String to a Date or Calendar object?
- How can I determine if a date is between two dates in Java? [duplicate]
- Java Date year calculation is off by year for two days
- How to create a Java Date object of midnight today and midnight tomorrow?
- How to convert date in to yyyy-MM-dd Format?
- Make SimpleDateFormat.parse() fail on invalid dates (e.g. month is greater than 12)
- Compare two dates in Java
- Parsing dates of the format “January 10th, 2010” in Java? (with ordinal indicators, st|nd|rd|th)
- How to obtain the start time and end time of a day?
- DateTimeFormatter month pattern letter “L” fails
- Getting unix timestamp from Date()
- getting the difference between date in days in java [duplicate]
- Convert string to Date in java
- What time zone does Date.toString() display?
- How to convert TimeStamp to Date in Java?
- LocalDate to java.util.Date and vice versa simplest conversion? [duplicate]
- java.util.Date and getYear()
- java: how to mock Calendar.getInstance()?
- Why can’t OffsetDateTime parse ‘2016-08-24T18:38:05.507+0000’ in Java 8
- Get Daylight Saving Transition Dates For Time Zones in Java