>Using VFP7.
>
>How can I calculate the number of months between 2 dates?
>
>x = {^2001/08/01}
>y = {^2002/08/31}
>
>Want to return 12 months. How can I do this?
>
>Thanks,
>
>Jerryt
? int((val(dtos(x)) - val(dtos(y))) / 100)
Divide by 1e4 to get total number of elapsed years.
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)