Something like this should do the trick:

String dt = "2008-01-01";  // Start date
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
c.setTime(sdf.parse(dt));
c.add(Calendar.DATE, 1);  // number of days to add
dt = sdf.format(c.getTime());  // dt is now the new date
Answer from Dave on Stack Overflow
🌐
BeginnersBook
beginnersbook.com › 2017 › 10 › java-add-days-to-date
Java – Add days to Date
September 11, 2022 - import java.text.SimpleDateFormat; ... c.setTime(sdf.parse(oldDate)); }catch(ParseException e){ e.printStackTrace(); } //Incrementing the date by 1 day c.add(Calendar.DAY_OF_MONTH, 1); String newDate = sdf.format(c.getTime()); System.out.println("Date Incremented by One: "+newDate); ...
🌐
Baeldung
baeldung.com › home › java › java dates › increment date in java
Increment Date in Java | Baeldung
January 8, 2024 - We’ll use it along with java.text.SimpleDateFormat for date formatting purposes: public static String addOneDayCalendar(String date) throws ParseException { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar c = ...
🌐
How to do in Java
howtodoinjava.com › home › java date time › add or subtract days, months & years to date in java
Add or Subtract Days, Months & Years to Date in Java
February 23, 2022 - Add and substract 1 day from LocalDate LocalDate today = LocalDate.now(); //Today LocalDate tomorrow = today.plusDays(1); //Plus 1 day LocalDate yesterday = today.minusDays(1); //Minus 1 day //2. Add and substract 1 month from LocalDateTime ...
🌐
Coderanch
coderanch.com › t › 583894 › java › add-day-Calendar
How do you add one day to a Calendar? (Java in General forum at Coderanch)
June 12, 2012 - There is no such field as Calendar.DAY. Hope that helps. Edit: The add method in GregorianCalendar is smart enough to roll over any overflow in the value you try to add to the indicated field. So if the date is January 30 and you add 2 to the date, you get February 1. Months roll over the year in the same fashion. ... JavaDocs say that Calendar.DAY_OF_MONTH ...
🌐
Mkyong
mkyong.com › home › java › java – how to add days to current date
Java - How to add days to current date - Mkyong.com
November 15, 2016 - package com.mkyong.time; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class DateExample { private static final DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); public static void main(String[] args) { Date currentDate = new Date(); System.out.println(dateFormat.format(currentDate)); // convert date to calendar Calendar c = Calendar.getInstance(); c.setTime(currentDate); // manipulate date c.add(Calendar.YEAR, 1); c.add(Calendar.MONTH, 1); c.add(Calendar.DATE, 1); //same with c.add(Calendar.DAY_OF_MO
🌐
W3Docs
w3docs.com › java
How can I increment a date by one day in Java?
To increment a date by one day in Java, you can use the plusDays() method of the java.time.LocalDate class from the java.time package. The plusDays() method returns a new LocalDate object that is the result of adding the specified number of ...
Find elsewhere
🌐
Edureka Community
edureka.co › home › community › categories › java › increment the date in java by 1-day
Increment the date in Java by 1-day | Edureka Community
May 2, 2018 - 2627/increment-the-date-in-java-by-1-day · Home · Community · Categories · Java · Increment the date in Java by 1-day · how do I turn a double in an array from 1000 to infinity Jul 9, 2024 · I have created a code in java for a flower ...
🌐
Delft Stack
delftstack.com › home › howto › java › how to add one day to a date in java
How to Add One Day to a Date in Java | Delft Stack
February 2, 2024 - It can be done by simply adding one day to Calendar class instance: // java 1.8 package simpletesting; import java.util.Calendar; import java.util.Date; public class SimpleTesting { public static void main(String[] args) { Date dt = new Date(); ...
🌐
Medium
medium.com › @AlexanderObregon › javas-localdate-plusdays-method-explained-6c06a2bc2f8d
Java’s LocalDate.plusDays() Method Explained | Medium
December 14, 2024 - For instance, a delivery service might add a certain number of days to the current date based on the type of service selected by the user: import java.time.LocalDate; public class DeliveryDateCalculator { public static void main(String[] args) { LocalDate today = LocalDate.now(); String deliveryType = "Express"; // Could also be "Standard" or "NextDay" long daysToAdd = switch (deliveryType) { case "Standard" -> 5; case "Express" -> 2; case "NextDay" -> 1; default -> 0; }; LocalDate deliveryDate = today.plusDays(daysToAdd); System.out.println("Delivery Date: " + deliveryDate); } }
🌐
Linux Hint
linuxhint.com › add-one-day-to-date-in-java
How to Add One Day to a Date in Java
Linux Hint LLC, [email protected] 1210 Kelly Park Circle, Morgan Hill, CA 95037 Privacy Policy and Terms of Use
🌐
Attacomsian
attacomsian.com › blog › java-add-days-to-date
How to add days to a date in Java
October 14, 2022 - Current Date & Time: ... 2016-12-15T10:15:30+01:00[Europe/Paris] Date & Time after Decrement: 2016-03-30T10:15:30+02:00[Europe/Paris] OffsetDateTime is another class from Java 8 new date and time API that represents a date and time with an offset from UTC/Greenwich in the ISO-8601 format (e.g. 2017-12-30T23:15:30-05:00). The following example demonstrates how you can add or minus days, months, and ...
🌐
BeginnersBook
beginnersbook.com › 2017 › 11 › java-8-adding-days-to-the-localdate
Java 8 – Adding Days to the LocalDate
September 11, 2022 - import java.time.LocalDate; public class Example { public static void main(String[] args) { //current date LocalDate today = LocalDate.now(); //adding one day to the localdate LocalDate tomorrow = today.plusDays(1); System.out.println("Tomorrow's Date: "+tomorrow); } }
🌐
Codemia
codemia.io › knowledge-hub › path › how_can_i_increment_a_date_by_one_day_in_java
How can I increment a date by one day in Java?
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises
🌐
Java2Blog
java2blog.com › home › core java › java date › how to add days to date in java
How to Add Days to Date in Java - Java2Blog
November 26, 2022 - Current date: Tue Dec 22 13:08:11 IST 2020 Given date: Wed Jan 10 13:14:18 IST 2018 Adding 1 days to current date: Thu Jan 11 13:14:18 IST 2018 · That’s all about how to add days to date in java.
🌐
GitHub
gist.github.com › javamultiplex › e941a5d0b55cc5101e19daff8e7d7c67
How to add N working days to the current date in Java? · GitHub
Save javamultiplex/e941a5d0b55cc5101e19daff8e7d7c67 to your computer and use it in GitHub Desktop. Download ZIP · How to add N working days to the current date in Java? Raw · AddNWorkingDays.java · This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below.
🌐
Liberian Geek
liberiangeek.net › home › how-to/tips › how to add days to date in java?
How to Add Days to Date in Java? | Liberian Geek
October 20, 2025 - Next, invoke the “plus()” method and pass the parameters of “1” and “ChronoUnit.DAYS” to add one day to the current date. In the same manner, call the “plus()” method and pass “5” and “ChronoUnit.DAYS” to add five days ...
🌐
JavaBeat
javabeat.net › home › how to add days to a date in java
How to Add Days to a Date in Java
March 20, 2024 - In this example, all the code remains ... System.out.println("The Current Date: " + dateFormat.format(calendar.getTime())); //Add Days to Date Using add() Method calendar.add(Calendar.DAY_OF_MONTH, 5); String modifiedDate = dateFormat.for...