Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How many Sundays in a month?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00487391
Message ID:
00487416
Views:
8
Hi Erik, little steps make the world go round =)

Here is what I ended up doing, if it can be hacked around any then I would like to know, so I have another step forward in ths world =)
function howmanysundays
lparameter DayOne && hold the start date
local ThisManySundays && hold howmany
ThisManySundays=0
for i = 0 to 31
	if month(dayone+i)<>month(Dayone) && am I still in the right month?
		exit
	endif
	if dow(dayone+i)=1
		ThisManySundays=ThisManySundays+1
	endif
endfor
return i-ThisManySundays &&Return how many working days are in this month
Thank you for your help any way
Iain Brodie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform