Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Week by Month
Message
De
26/12/2006 15:10:20
 
 
À
26/12/2006 15:02:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01180294
Message ID:
01180300
Vues:
16
This message has been marked as a message which has helped to the initial question of the thread.
Function getmyfriday
LPARAMETERS nMonth,nYear
local dStartdate,nLoop
dStartdate=DATE(nYear,nMonth,1)
FOR nLoop=0 TO 6
	dDate=dStartdate+nLoop
	IF DOW(dDate)=6		&& it's Friday
		RETURN dDate+21
	endif
ENDFOR
>Hi,
>
>
>I need to get the four friday date from each month.
>
>Example:
>getFourFridayFromMonth(year = 2007, month = 01) && return Date(2007,01,26)
>getFourFridayFromMonth(year = 2007, month = 02) && return Date(2007,02,23)
>getFourFridayFromMonth(year = 2007, month = 03) && return Date(2007,03,23)
>getFourFridayFromMonth(year = 2007, month = 04) && return Date(2007,04,27)
>getFourFridayFromMonth(year = 2007, month = 05) && return Date(2007,05,25)
>getFourFridayFromMonth(year = 2007, month = 06) && return Date(2007,06,22)
>getFourFridayFromMonth(year = 2007, month = 07) && return Date(2007,07,27)
>getFourFridayFromMonth(year = 2007, month = 08) && return Date(2007,08,24)
>getFourFridayFromMonth(year = 2007, month = 09) && return Date(2007,09,28)
>getFourFridayFromMonth(year = 2007, month = 10) && return Date(2007,10,26)
>getFourFridayFromMonth(year = 2007, month = 11) && return Date(2007,11,23)
>getFourFridayFromMonth(year = 2007, month = 12) && return Date(2007,12,26)
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform