This question already has an answer here:
I want to add one day to a particular date. How can I do that?
Date dt = new Date();
Now I want to add one day to this date.
This question already has an answer here:
I want to add one day to a particular date. How can I do that?
Date dt = new Date();
Now I want to add one day to this date.
you want after days find date this code try..
Java 8 LocalDate API
LocalDate.now().plusDays(1L);
I found a simple method to add arbitrary time to a Date object
Where:
As mentioned in the Top answer, since java 8 it is possible to do:
but this can sometimes lead to an
DateTimeException
like this:It is possible to avoid this Exception by simply passing the time zone:
This will increase any date by exactly one
use DateTime object obj.Add to add what ever you want day hour and etc. Hope this works:)