dbTalk Databases Forums  

Age formula

comp.databases.filemaker comp.databases.filemaker


Discuss Age formula in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve McGillivray
 
Posts: n/a

Default Age formula - 12-11-2003 , 03:03 PM






I'm new to formulas and functions. I'm trying to figure out a formula that
can figure out your age when given a Birthday.

Anyone?



Reply With Quote
  #2  
Old   
rqo
 
Posts: n/a

Default Re: Age formula - 12-11-2003 , 03:50 PM






Heres a real quick one.

Field Name 1
B_Day
(Format: Date)

Field Name 2
Calc Age
(Format: Calculation) Int((Status( CurrentDate)-B_Day)/365.25)

"Steve McGillivray" <steve.mcgillivray (AT) asu (DOT) edu> wrote

Quote:
I'm new to formulas and functions. I'm trying to figure out a formula that
can figure out your age when given a Birthday.

Anyone?





Reply With Quote
  #3  
Old   
Glenn Schwandt
 
Posts: n/a

Default Re: Age formula - 12-11-2003 , 04:01 PM



AgeYears (calculation, number) =

Year (Status (CurrentDate)) - Year (Birthday) -
(Month (Status (CurrentDate)) < Month (Birthday)) -
((Month (Status (CurrentDate)) = Month (Birthday)) and
(Day (Status (CurrentDate)) < Day (Birthday)))


"Steve McGillivray" <steve.mcgillivray (AT) asu (DOT) edu> wrote

Quote:
I'm new to formulas and functions. I'm trying to figure out a formula that
can figure out your age when given a Birthday.

Anyone?







Reply With Quote
  #4  
Old   
Michael Myett
 
Posts: n/a

Default Re: Age formula - 12-11-2003 , 08:17 PM



Here's one more for the mix.

Year(Status(CurrentDate)) - Year(DOB) - (DayofYear(Status(CurrentDate))
< DayofYear(DOB))

Michael Myett


Steve McGillivray wrote:
Quote:
I'm new to formulas and functions. I'm trying to figure out a formula that
can figure out your age when given a Birthday.

Anyone?




Reply With Quote
  #5  
Old   
rqo
 
Posts: n/a

Default Re: Age formula - 12-11-2003 , 11:15 PM



lots of ways to skin this cat..eh?

rqo

"Michael Myett" <michael.myett (AT) verizon (DOT) net> wrote

Quote:
Here's one more for the mix.

Year(Status(CurrentDate)) - Year(DOB) - (DayofYear(Status(CurrentDate))
DayofYear(DOB))

Michael Myett


Steve McGillivray wrote:
I'm new to formulas and functions. I'm trying to figure out a formula
that
can figure out your age when given a Birthday.

Anyone?






Reply With Quote
  #6  
Old   
Michael Myett
 
Posts: n/a

Default Re: Age formula - 12-12-2003 , 12:28 AM



Yes and no.

Be careful, using a formula that simply divides by 365.25 will cause
problems on leap years and using a formula that doesn't take into
account if the birthdate has occured this year or not will give
incorrect results in some circumstances.

Michael Myett

rqo wrote:
Quote:
lots of ways to skin this cat..eh?

rqo

"Michael Myett" <michael.myett (AT) verizon (DOT) net> wrote in message
news:xy9Cb.903$mv.68 (AT) nwrdny01 (DOT) gnilink.net...

Here's one more for the mix.

Year(Status(CurrentDate)) - Year(DOB) - (DayofYear(Status(CurrentDate))
DayofYear(DOB))

Michael Myett


Steve McGillivray wrote:

I'm new to formulas and functions. I'm trying to figure out a formula

that

can figure out your age when given a Birthday.

Anyone?







Reply With Quote
  #7  
Old   
Steve McGillivray
 
Posts: n/a

Default Re: Age formula - 12-12-2003 , 11:02 AM



Thank you all. It is interesting to see the different ways to tackle a
problem.

Please see my new post for another formula. I think it's a little trickier.

Steve McGillivray


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.