Stringdt = "2016-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); // add one more day.
dt = sdf.format(c.getTime()); // dt is the day plus one day
You can do it like this.
© 2024 OneMinuteCode. All rights reserved.