Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Number of days in a month
Message
De
09/10/1997 08:45:54
 
 
À
09/10/1997 08:13:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00053634
Message ID:
00053844
Vues:
28
>>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

nNumberofDaysInMonth = {12/1/97}-{11/1/97}

gives the same thing.

Vlad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform