Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last day of a month
Message
 
À
04/11/1999 16:15:58
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00287143
Message ID:
00287150
Vues:
25
>Hello everyone.
>
>Is there a native VFP function to return the last day of the month?
>
>Thanks,
>Sergio

No, but there's a combination:

GOMONTH(DATE()- DAY(DATE() + 1), 1) - 1

I know that's convoluted, but it's the only reliable way. DATE() - DAY(DATE()) gives you the last day of the previous month. Add a day to give you the first of the current month. GOMONTH() gives you the first of the next month. -1 gives you the last day of the current month.
-cjh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform