Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the last day.
Message
De
09/10/2001 15:41:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
09/10/2001 15:36:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00566150
Message ID:
00566153
Vues:
16
>Hello at alls.
>How can I get the last month day.?
>For example if I send to the program 01-20-2001
>The system should know that the last day month is 31.
>TIA

Subtract 1 from the first of the next month. Example (requires VFP6 or later):
lnYear = 2001
lnMonth = 10
? date(lnYear, lnMonth+1, 1) - 1
Additional adjustments are required for December (if month + 1 = 13, add one to year).

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform