Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Days in month
Message
 
 
À
05/11/2007 12:07:15
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:
01266763
Vues:
10
greg,

The code depends on SET DATE AMERICAN to be in effect. It'll produce incorrect resut or blow up with other settings. It's better to use DATE() function. Also YEAR() function requires an argument.
RETURN DAY(GOMONTH(DATE(pnYear, pnMonth,1),1) -1)
>An error in the formula - it should be:
>
>
>FUNCTION DayInMonth
>LPARAMETERS pnMonth
>RETURN DAY(GOMONTH(CTOD(TRANSFORM(pnMonth)+"/01/"+TRANSFORM(YEAR())),1)-1)
>
>
>Should use CTOD() rather than DTOC()...
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform