Age in Months

Please discuss general Delphi programming topics here.

Age in Months

Postby rhartl » December 8th, 2006, 6:21 pm

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
rhartl
Active Member
Active Member
 
Posts: 11
Joined: June 12th, 2006, 2:30 am

Postby Kambiz » December 8th, 2006, 11:38 pm

Code: Select all
uses dateutils;

var AgeInMonth: Double;

AgeInMonth := MonthSpan(Today, BirthDate);
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2421
Joined: March 7th, 2003, 7:10 pm

Thanks

Postby rhartl » December 9th, 2006, 3:05 pm

Thanks a million Kambiz.

-- Rich
rhartl
Active Member
Active Member
 
Posts: 11
Joined: June 12th, 2006, 2:30 am


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron