Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Days in a Month
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00757135
Message ID:
00757221
Vues:
15
>Is there a function available to calulate the # of days in a given month from a date() function?
>
>Jeff

There might be easier ways, but how about:
FUNCTION DaysInMonth
LPARAMETERS tdDate
   LOCAL ldTemp 
   
   ldTemp = DATE(YEAR(tdDate), MONTH(tdDate), 15)
   ldTemp = ldTemp + 25
   
   ldTemp = DATE(YEAR(ldTemp), MONTH(ldTemp), 1)
   
   RETURN DAY(ldTemp - 1)
ENDFUNC 
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform