Getting someone's age from dob and current year

Roger Eller roger.e.eller at sealedair.com
Sat Jul 30 20:29:32 EDT 2011


On Sat, Jul 30, 2011 at 5:20 PM, Admin wrote:

>
> 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
>

I gotta start reading the whole message before I reply...

If you already have two 4-digit year values in variables, you can simply put
their difference into another variable (or container).
put (largYear - smallYear) into tAge

You can also say:
subtract smallYear from largeYear
answer largeYear -- which now becomes the age

˜Roger



More information about the use-livecode mailing list