on 10-04-2006 6:23 PM
Hello!
I need to write a for loop that need to loop through a date range. I don't know how to make the date increment. Any suggestion? Please help.
i would like to do something like this:
for(keydate = fromdate; keydate <= todate; keydate++)
fromdate and todate are the two ends of the date range
keydate is the date that i am currently look at.
long fromdatelong = fromdate.getTime();
long todatelong = todate.getTime();
for(long keydatelong = fromdatelong; keydatelong < todatelong; keydatelong = keydatelong + 1000*60*60*24) {
Date keydate = new Date(keydatelong);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you very much.
i didn't thought about that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.