Computing the age of a person?

Klaus on-rev klaus at major.on-rev.com
Thu May 14 12:06:59 EDT 2009


Hi Jaqueline and Mark,

> Hi Klaus,
>
> Please test:
>
> function age theDate
>     set the useSystemDate to true
>     convert theDate to dateItems
>     put the date into myToday
>     convert myToday to dateitems
>     put item 1 of myToday - item 1 of theDate - 1 into myAge
>     put item 1 of myToday into item 1 of theDate
>     convert theDate to seconds
>     if theDate < the seconds then add 1 to myAge
>     return myAge
> end age
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> http://economy-x-talk.com
> http://www.salery.biz
> Dutch forum: http://runrev.info/rrforum

Thanks a lot, that was what I was looking for :-)


Nest

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com




More information about the use-livecode mailing list