February 27, 200322 yr I'm using the age calculation: NumToText(Year(Today) - Year(DOB) - If(Today<Date(Month(DOB),Day(DOB),Year(Today)), 1, 0))&"Years,"&NumToText(Mod(Month(Today) - Month(DOB) + 12 - If(Day(Today) < Day(DOB), 1, 0), 12))&"Month,"&NumToText(Day(Today) - Day(DOB) + If(Day(Today) >=Day(DOB), 0,If(Day(Today- Day(Today)) < Day(DOB),Day(DOB),Day(Today- Day(Today)))))&"Days" I copied it from a post I found searching here on the boards. First of all, I'm getting the wrong result. From the birthdate '4/15/1973' I'm getting '2003years,2months,27days'. Not only that, but it's not different for every record, it uses the same result for every record in my client file. WTF??? I have the calculation using the 'DOB' date field. Could I be having problems because the dates are entered in MM/DD/YYYY format???
February 27, 200322 yr '2003years,2months,27days' is exactally today's date so.. DOB is empty because it is not a date field or 'cause it comes from relationship that is not activated. DJ
February 27, 200322 yr Hi ddreese, Using this format of the date 4/15/1973, the result using the calculation above is: 29Years,10Month,12Days HTH Lee
February 27, 200322 yr Use the Status(CurrentDate) function instead of the Today function and make the calculation unstored. This might not solve your current problem but it will fix the one you're going have sooner or later! Todat only relaculates whenever the file is opened. If you host the file on a FM server or leave the file open more then 24 hours (or just across the mignight changeover) the calculation will be incorrect. It won't recalculate until you close and reopen the database. Status(CurrentDate) has no such limitations.
Create an account or sign in to comment