Getting someone's age from dob and current year

Admin admin at mfelkerco.com
Sat Jul 30 17:20:53 EDT 2011


  

Hello all, 

I need to figure out someone's age.

I have their date
of birth and I have today's date. How do I get the end result. My math
skills SUCK.

Here's my code (loaded in from the database with a SELECT
statement):

put item 7 of myLine into dobMonth
put item 8 of myLine
into dobDay
put item 9 of myLine into dobYear
put chartonum("dobYear")
into dobYearNum
put the long system date into field "TodayDate"

I
figured I would subtract this year from the dobyear and get the age - am
I right? How would I do this if I am?

Mike 
  


More information about the use-livecode mailing list