Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Number of days in a month
Message
 
À
07/10/1997 23:11:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00053634
Message ID:
00053637
Vues:
37
>Is there a function to get the number of days in a month.
>eg. the number of days in any month of any year.
>
>Thanks
>Andrew

As long as I know VFP does not have a function for this, but is very easy you can make your own such as this

Function DaysOfMonth
Lpara tnMonth, tnYear
*-- have to pass the year also as parameter to find out if is a leap year

do case
case tnMonth=1
return 31
case tnMonth=2
if mod(tnYear,4)=0 &&leap year
return 29
else
return 28
endif
case tnMonth=3
return 31
etc...
etc...
endcase
Jorge Flores
From the Amigo Country
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform