Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting date of 3 months back from current date.

 
Saurabh Agrawal
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to get the date of 3 months back from the current date. Can anyone tell me how can i do that ?



Thanks in advance,

Saurabh
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64838
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please reserve this forum for questions on advanced Java. This post has been moved to a more appropriate forum.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
calendarObject.add(appropriateCalendarField, -whateverNumberYouWant);
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you expect for May 31 minus 3 months? What do you get?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic