Re: Calculate age in Filemaker



On Thu, 2010-04-15 at 14:26 +0200, Manuel Rodríguez Núñez wrote:
In Filemaker I do very simple but not accurate because it ignores the
month.
I use the following calculation:
      Int ((Get (CurrentDate)-date_of_birth) / 365)
You must remember to check the box that the result is numeric.

However, that's rather innaccurate. You could do the same thing with
this in Python but it would be equally wrong:
 import datetime
 (datetime.date.today() - datetime.date(1973,5,11)).days / 365
or
  (datetime.date.today() - record["date_of_birth").days / 365

This is just a sample of what Google will find on this subject:
http://filemakertoday.com/com/showthread.php?10491-Age-Calculation-For-the-Thoroughly-Confused-Please



-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]