Answer the question
In order to leave comments, you need to log in
How to add 1 day correctly?
I am using Wdullaer Materialdatetimepicker library for date picker. And when adding 1st day (if the number is 31) then it shows 32. Here is how I add one day:
Integer.toString(++dayOfMonth) + "/" + monthOfYear + "/" + Integer.toString(year);
Answer the question
In order to leave comments, you need to log in
Use Calendar to store the date. There are operations that you need.
Calendar calendar = new GregorianCalendar(year, monthOfYear, dayOfMonth);
calendar.add(Calendar.DATE, 1);
day + "/" + month + "/" + year
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question