aspose file tools
The moose likes Java in General and the fly likes Increment Date String by 1 Day Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Increment Date String by 1 Day" Watch "Increment Date String by 1 Day" New topic
Author

Increment Date String by 1 Day

alpesh helwatkar
Ranch Hand

Joined: Apr 06, 2009
Posts: 30

I have a date String newDate = "31.05.2001"

which i have to increment by 1 Day.

I tried the following code :

But with this code, it is only managing to add the DAY i.e output of 31.05.2001 will be 1.05.2001 keeping the month and the year unchanged!!! Please help me in this...

I've also tried c.roll(Calendar.DATE, 1); // number of days to add
alpesh helwatkar
Ranch Hand

Joined: Apr 06, 2009
Posts: 30

DONE...

CHNAGED
TO
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

If you cross posted the same question in different forum, please tell us!
http://stackoverflow.com/questions/6675019/increment-date-string-by-1-day
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Please, read : BeForthrightWhenCrossPostingToOtherSites
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Increment Date String by 1 Day
 
Similar Threads
How to print default date in required format
how to change the date format
Date Validation
String conversion
Incrementing the date