>Wondering if anyone has coded a routine to take two datetime fields and return various information regarding them, such Years,Months,Days,Hours
>
>Thanks
>Kirk
What exactly do you want to know?
For instance, if you want total elapsed days, you can use:
? int((x-y)/86400)
Another method for total elapsed days (which can be extended more easily to years or months):
? int((val(ttoc(x,1)) - val(ttoc(y,1))) / 1e6)
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)