Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the last day.
Message
From
09/10/2001 15:41:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
09/10/2001 15:36:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00566150
Message ID:
00566153
Views:
14
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform