aspose file tools
The moose likes Java in General and the fly likes Iterating Through Dates Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Iterating Through Dates" Watch "Iterating Through Dates" New topic
Author

Iterating Through Dates

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1260
If I have a begining date and and ending date how do I iterate through them getting a value for each month?
Bill Cruise
Ranch Hand

Joined: Jun 01, 2007
Posts: 148
As I hinted at in your other post, make a Calendar object for both dates. Add one to the day field of the start date until it reaches the end date.
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1260
Thanks. I got it to work as you said.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35438
    
    9
This thread has a great subject line, so I was kind of disappointed to read about calendars and stuff.


Android appsImageJ pluginsJava web charts
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18670


"I'm not back." - Bill Harding, Twister
Bill Cruise
Ranch Hand

Joined: Jun 01, 2007
Posts: 148
Ulf, I'm not sure what it says about me that I had to read your post 3 times before I got the joke. I guess my mindset is extremely dependent on what internet forum I'm reading.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Iterating Through Dates
 
Similar Threads
prepareStatement() returns 0 value
How to get Current Date in Xsl
string question
how to get duration starting date to ending date in visual jsf
how can i get previous date?