File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Adding days to a date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Adding days to a date" Watch "Adding days to a date" New topic

Adding days to a date

aresh babu
Ranch Hand

Joined: Aug 31, 2008
Posts: 65
Hi All,

My requirement is to add no.of days to date as shown below. The date will be in string format.

So please let me know how to convert the string to date and after conversion how to add no.of days to the date.

For Eg:


Please help to solve this issue.

Thanks & Regards
Tim Moores

Joined: Sep 21, 2011
Posts: 2409
And you want to do this in a Unix shell script?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17247

No problem. Here's a little snippet I use to get the start (STIME) and end date (ETIME) of a month:

"MM" is the name of a month in the current year.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Adding days to a date
It's not a secret anymore!