aspose file tools
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

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
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: 16537

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.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: Adding days to a date