This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes calculate todays date minus last one year in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "calculate todays date minus last one year in java" Watch "calculate todays date minus last one year in java" New topic
Author

calculate todays date minus last one year in java

Abhishek Shirodkar
Greenhorn

Joined: May 08, 2009
Posts: 26
Hello All

how do i calculate todays date minus last one year in java.


Thanks in advance
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

Abhishek Shirodkar wrote:Hello All

how do i calculate todays date minus last one year in java.


Thanks in advance


Take a look at java.util.GregorianCalendar and the add() method.

P.S. You are allowed to add negative amounts!


Retired horse trader.
 Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
 
 
subject: calculate todays date minus last one year in java