Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6174 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

  • 2 weeks later...
Posted (edited)

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 by Guest
Posted

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

This topic is 6174 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.