I've tried to search for the answer to my question before posting, so if this has been asked and answered please point me in the right direction. I did find some information, but it was related to current date.

I want calculate age in years, months and days based on birth and death. I provided a sample database.

Birth: May 5, 2001

Died: June 9, 2007

My projects involves a cemetery, which is why using "current date" doesn't work.

Thank you in advance.

Connie

(Mac OS X)

Connie

Winfied Husllik has this one posted on Brian Dunnings CF site. http://www.briandunning.com/cf/518

// © 2006 Winfried Huslik, www.fmdiff.com

Let ( [

neg = Case ( date1 > date2 ; -1 ; 1 ) ;

d1 = Case ( neg < 0 ; date2 ; date1 ) ;

d2 = Case ( neg < 0 ; date1 ; date2 ) ;

d = mod ( Day ( d2 ) - Day ( d1 ) ; Day (

Date ( Month ( d1 ) + 1 ; 0; year ( d1 ) ) ) ) ;

m = mod ( Month ( d2 ) - Month ( d1 ) -

( Day ( d2 ) < Day ( d1 ) ) ; 12 ) ;

y = Year ( d2 ) - Year ( d1 ) - ( ( Month ( d2 ) -

( Day ( d2 ) < Day ( d1 ) ) ) < Month ( d1 ) )

];

y * neg & ¶ &

m * neg & ¶ &

d * neg & ¶ &

y & " years, " & m & " months, and " & d & " days" & ¶

)