Mar 31, 2004 #1 Buckaroo8 Programmer Aug 6, 2003 27 US Hi All, I have three numeric fields to work with: BirthDay BirthMonth BirthYear How can I utilixe them to calcuate a persons age in Years, or if younger, months or days? i.e. the result will appear either: 21 y 7 m 18 d Thanks for all help!
Hi All, I have three numeric fields to work with: BirthDay BirthMonth BirthYear How can I utilixe them to calcuate a persons age in Years, or if younger, months or days? i.e. the result will appear either: 21 y 7 m 18 d Thanks for all help!
Mar 31, 2004 #2 MrBillSC Programmer Aug 6, 2001 592 US Use the Date and the DateDiff functions. Date(Birthyear,Birthmonth,Birthday) will treat these fields as a date, then use the datediff function to calc the age. MrBill Upvote 0 Downvote
Use the Date and the DateDiff functions. Date(Birthyear,Birthmonth,Birthday) will treat these fields as a date, then use the datediff function to calc the age. MrBill
Mar 31, 2004 1 #3 synapsevampire Programmer Mar 23, 2002 20,180 US A datediff of years against a date will give you the wrong age as date diff will only compare the years. Here's an example for a real age: http://www.kenhamady.com/form06.html Use a formula akin to MrBill's in the formula, as in: cdate({table.byear},{table.bmonth},{table.bday}) -k Upvote 0 Downvote
A datediff of years against a date will give you the wrong age as date diff will only compare the years. Here's an example for a real age: http://www.kenhamady.com/form06.html Use a formula akin to MrBill's in the formula, as in: cdate({table.byear},{table.bmonth},{table.bday}) -k