>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)