February 14, 200818 yr My database has an age calculation field, which works fine. I enter the DOB: 8/1/2007 today it will display 1 Y, 0 M I need the calculation to display the age that the person will have in October 1 How can this be accomplished? GetAsText(Year(Get ( CurrentDate )) - Year(DOB) - If(GetAsNumber(Get ( CurrentDate ))< Date(Month(DOB); Day(DOB); Year(Get ( CurrentDate ))); 1; 0)) & " Y, " & GetAsText(Mod(Month(Get ( CurrentDate )) - Month(DOB) + 12 - If(Day(Get ( CurrentDate )) < Day(DOB); 1; 0); 12)) &" "&"M" I appreciate any help Thanks.
February 14, 200818 yr It can be accomplished by using the date of October 1 (which year??!) instead of Get (CurrentDate).
February 27, 200817 yr Author DOB = 12/3/2004, Current age calculation = 3 Y, 2 M as today. New Calculation: GetAsText(Year(Target Date) - Year(DOB) - If(GetAsNumber(Target Date)< Date(Month(DOB); Day(DOB); Year(Target Date)); 1; 0)) & " Y, " & GetAsText(Mod(Month(Target Date) - Month(DOB) + 12 - If(Day(Target Date) < Day(DOB); 1; 0); 12)) &" "&"M" Target Date = 8/1/2008 -Global Date Field Age by August, 1 08 = 4 Y, 7 M Can you help me to fix this and in addition to calculate the days? Thanks Edited February 27, 200817 yr by Guest
February 27, 200817 yr Your calculation returns "3 Y, 7 M" here. In any case, I don't know what the correct result should be, so I wouldn't know how to fix it - see: http://www.fmforums.com/forum/showtopic.php?tid/189394/#263667
Create an account or sign in to comment