Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Month repartition from two dates
Message
From
15/07/1997 15:51:55
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
13/07/1997 12:54:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00039620
Message ID:
00040086
Views:
25
> I first use Paul's formula to get the number of months between two dates. > So, this will give me my counter for the FOR NEXT. I also start with the > highest date. > > FOR lnCounter=1 TO lnNumberMonths > > Then, I can do a count for the number of messages from the highest date. > > COUNT FOR ADDDATE>=ldDate2 AND ADDDATE<=GOMONTH(ldDate2,1)-1 TO lnMessage > > Then, after my processing, for the next FOR loop, I need to remove one > month from the highest date. > > ldDate2=GoMonth(ldDate2,-1) > > And, the loop continues... Well, both solutions are (written :) quick. BTW, shouldn't "addate between this and that" be faster than "adddate <= this and adddate>=that)"? Not only for writing, but considering SQL. Anyone measured this?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform