ddreese Posted February 27, 2003 Posted February 27, 2003 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???
djgogi Posted February 27, 2003 Posted February 27, 2003 '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
Lee Smith Posted February 27, 2003 Posted February 27, 2003 Hi ddreese, Using this format of the date 4/15/1973, the result using the calculation above is: 29Years,10Month,12Days HTH Lee
Vaughan Posted February 27, 2003 Posted February 27, 2003 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now