Newbies jackoooooo Posted September 18, 2011 Newbies Posted September 18, 2011 I try to find out a formula to calculate UPDATE age,,, here is the formula I use right now Year(Get(CurrentDate)) - Year(DateOfBirth) but it will not update, for example: DateOfBirth = 09/18/1980 Today= 09/17/2011 so,, today age is 29 it should turn to 30 tomorrow,,, but the formula wont update the age..... any solution, thank you
comment Posted September 18, 2011 Posted September 18, 2011 it should turn to 30 tomorrow The formula you are using takes into account only the year - therefore it will change only on January 1. If you want a more accurate calculation, use = Let ( [ today = Get (CurrentDate) ] ; Year ( today ) - Year ( DateOfBirth ) - ( today < Date ( Month ( DateOfBirth ) ; Day ( DateOfBirth ) ; Year ( today ) ) ) ) --- P.S. Make sure the calculation field is unstored.
Newbies jackoooooo Posted September 19, 2011 Author Newbies Posted September 19, 2011 thx,, finally, I find out it is a " unstored" problem...
FMPierce Posted September 22, 2011 Posted September 22, 2011 My dad and I made this calc. It is accurate to the day. Let ( X = DateOfBirth ; Let ( y = Get ( CurrentDate ) ; If ( Month ( y ) = Month ( X ) ; If ( Day ( y ) ≥ Day ( X ) ; Year ( y ) - Year ( X ) ; Year ( y ) - Year ( X ) - 1 ) ; If ( Month ( y ) > Month ( X ) ; Year ( y ) - Year ( X ) ; Year ( y ) - Year ( X ) - 1 ) ) ) ) Hope this helps!
Recommended Posts
This topic is 4869 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 accountSign in
Already have an account? Sign in here.
Sign In Now