I have date and time in the format of yyyy-MM-dd:HH:mm
I want to increase the dd
by one
i.e 2013-10-24:11:20
to 2013-10-25:11:20
SimpleDateFormat mSDF = new SimpleDateFormat("yyyy-MM-dd:HH:mm");
time = mSDF.format(calSet.getTime());//calset in my calendar instance
I don't know what exactly my time/date is .I only know that I have to increase date by one for time
variable
Use calendar
Calendar cal=Calendar.getInstance();
cal.setDate(yourdate); // pass parsed Date object
cal.add(Calendar.DATE, 1);
cal.getTime(); // here you will get your date
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With