Page 1 of 1

Age in Months

PostPosted: December 8th, 2006, 6:21 pm
by rhartl
Anyone ever have to write a routine in Delphi that returns a person's age in months to the nearest 1/10th of a month. I have been wrestling with this for several days now, and I can't seem to come up with the solution. Help!

-- Rich

PostPosted: December 8th, 2006, 11:38 pm
by Kambiz
Code: Select all
uses dateutils;

var AgeInMonth: Double;

AgeInMonth := MonthSpan(Today, BirthDate);

Thanks

PostPosted: December 9th, 2006, 3:05 pm
by rhartl
Thanks a million Kambiz.

-- Rich