Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Days in month
Message
De
05/11/2007 07:29:56
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
05/11/2007 06:38:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
Divers
Thread ID:
01266644
Message ID:
01266667
Vues:
8
>Hi
>There is a way to know how many days I have in specific month(29/30/31)?
>(for example I call the fanction ?func?({09/09/2006})

Hi Chaim

Sergey's formula is correct, but IMO it is actually two functions in one.

This part means get the first day of the month: ldDate-DAY(ldDAte)+1. That of itself should be a UDF. FirstDayOfMonth(m.ldDate)

Then there is the part that gets the last day of the month.

GOMONTH(FirstDayOfMonth(m.ldDate),1) -1

So what Sergey said is:

?Day(LastDayOfMonth(m.ldDate))

Check out the versions on the wiki

http://fox.wikis.com/wc.dll?Wiki~FirstDayOfMonth

http://fox.wikis.com/wc.dll?Wiki~LastDayOfMonth

The goal is not to write and decipher formulas, but "The goal is to create routines with internal integrity (strong cohesion) and small, direct, visible, and flexible relations to other routines (loose coupling)."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform