Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How many Sundays in a month?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00487391
Message ID:
00487416
Vues:
7
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform