Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Number of days in a month
Message
De
09/10/1997 08:13:46
 
 
À
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:
00053837
Vues:
27
>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


There are 3rd party functions available but it's soooo easy to roll your own.

Let's say you want to know the number of days in November, 1997:

nNumberofDaysInMonth = val(sys(11,{12/1/97}) - val(sys(11,{11/1/97})

What your doing is getting the Julian date for the start date of each month and calculating the difference. The diffenece is the number of days is in the first month.

Hope this helps.

Andrew
Andrew Dewey
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform