| Author |
How to Calculate 30 days minus Today's Date?
|
James Dekker
Ranch Hand
Joined: Dec 09, 2006
Posts: 215
|
|
Am trying to figure out how to create a mechanism which will:
1. Compute today's date.
2. Minus it by 30 days (based on a String const that is placed in an inner class)?
Here's my constant:
Here's my calling code:
Am confused as my requirement is to use a constant parameter which is String?
Thank you for taking the time to read this...
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8563
|
|
Am confused as my requirement is to use a constant parameter which is String?
You will need to construct(hint) an Integer(hint) from the string constant, so you can use it in the add method
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
Divya Janyavula
Greenhorn
Joined: May 24, 2011
Posts: 19
|
|
|
[mg]edited out solution
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8563
|
|
Divya,
Welcome to the Ranch. I had to edit out your post because
We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers.
|
 |
Divya Janyavula
Greenhorn
Joined: May 24, 2011
Posts: 19
|
|
Was not aware. Thanks for that
|
 |
 |
|
|
subject: How to Calculate 30 days minus Today's Date?
|
|
|