SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
Calendar c = Calendar.getInstance();
c.setTime(new Date()); // Using today's date
c.add(Calendar.DATE, 5); // Adding 5 days
String output = sdf.format(c.getTime());
System.out.println(output);
More Related Contents:
- specific date string format [duplicate]
- Hours and seconds are lost when storing a date in the database [closed]
- How to get the day from timezone in java [duplicate]
- How to parse a date? [duplicate]
- How can I get the current date and time in UTC or GMT in Java?
- How do you format the day of the month to say “11th”, “21st” or “23rd” (ordinal indicator)?
- How to convert java.util.Date to java.sql.Date?
- Dates with no time or timezone component in Java/MySQL
- How do I check if a date is within a certain range?
- Date and time conversion to some other Timezone in java
- how to convert java string to Date object [duplicate]
- How to accept Date params in a GET request to Spring MVC Controller?
- Extract time from date String
- Calculating the difference between two Java date instances
- Spring Boot Jackson date and timestamp Format
- How to convert a date to milliseconds
- Comparing date strings in Java [duplicate]
- Generic support for ISO 8601 format in Java 6
- Convert between LocalDate and sql.Date [duplicate]
- Get the week start and end date given a current date and week start
- Why does Java’s Date.getYear() return 111 instead of 2011?
- how to add days to java simple date format
- Parse String date in (yyyy-MM-dd) format
- How to Parse Date from GMT TimeZone to IST TimeZone and Vice Versa in android
- Java: Get month Integer from Date
- Converting date-string to a different format
- Java Date Format for Locale
- How create Date Object with values in java
- Determine if a String is a valid date before parsing
- Fastest way to parse a date in Basic ISO 8601 format, using Java [closed]