Calculating age

Mark Smith Mark_Smith at
Thu Jun 26 22:44:00 EDT 2014

Hi, does anyone know how to calculate someones age in years from two dates?

Currently I am doing something kludgy like:

convert dateone from date to seconds
convert datetwo from date to seconds
put datetwo - dateone into age -- calculate the age in seconds
-- divide by the number of seconds per year
put 60*60*24*365.25 into secs_per_year
put the trunc of (age / secs_per_year) into age

But I suspect it is only approximate.


View this message in context:
Sent from the Revolution - User mailing list archive at

More information about the Use-livecode mailing list