Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function to get the last day of month
Message
 
À
16/07/1997 10:44:07
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00039619
Message ID:
00040412
Vues:
39
>>m.ldDate = {any date)
>>? gomonth(m.ldDate-day(m.ldDate)+1,1)-1
>>
>>Basically:
>>
>>1) go to the first day of the current month
>>2) advance a month
>>3) backup 1 day
>
>Can somebody, Pls tell me which one of all these methods is correct & best...
Vinod,

Either of these will work, the first one is a bit faster than the second one.

gomonth(m.ldDate-day(m.ldDate)+1,1)-1

or

GoMonth(ldDate,1)-day(gomonth(ldDate,1)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform