9 Replies Latest reply on Jan 30, 2017 12:35 PM by kkalach

# ACTUAL AGE

Good afternoon, last year I redid our database.  I created a field for actual age and used this formula

Year (Get ( CurrentDate )) - birthday year

now that we have changed to 2017 the ages did not increase by a year.   If I go into the database and retype the year it will change to the correct age.  I don't want to have to go through our entire data base and retype the year of birth.

Can anyone help out with this

Karen

• ###### 1. Re: ACTUAL AGE

Is the formula you used stored ? It should not be.

In our software the age is an unstored calc defined as:

Let ( [

C = Get ( CurrentDate ) ;

yC = Year ( C ) ;

mC = Month ( C ) ;

dC = Day ( C ) ;

doyC = DayOfYear ( C ) ;

B = Date of birth ;   // <---- this is the field holding the patient's date of birth.

yB = Year ( B ) ;

mB = Month ( B ) ;

dB = Day ( B ) ;

doyB = DayOfYear ( Date( mB ; dB ; yC ) ) ;

num_years = ( yC - yB - ( doyC < doyB ) ) ;

num_months = Mod ( mC - mB - (dC < dB ) ; 12 ) ;

num_days = C - Date ( mC - ( dC < dB ) ; dB ; yC ) ] ;

1 of 1 people found this helpful
• ###### 2. Re: ACTUAL AGE

What do you mean stored.  The formula is under specified value

Karen Kalach

Assistant to Bill Mann

LPL Financial

203-271-3192

www.thefinancialarchitect.net<http://www.thefinancialarchitect.net>

• ###### 3. Re: ACTUAL AGE

If this is a field with an auto-entered calculation, it will not update automatically.

If it it is a field of type calculation, open the calculation in the calculation editor, click storage options and select the "do not store..." option.

• ###### 4. Re: ACTUAL AGE

2 of 2 people found this helpful
• ###### 5. Re: ACTUAL AGE

field is a number type and did a calculation in validated by calculation

Karen Kalach

Assistant to Bill Mann

LPL Financial

203-271-3192

www.thefinancialarchitect.net<http://www.thefinancialarchitect.net>

• ###### 6. Re: ACTUAL AGE

in your first post you wrote

I created a field for actual age and used this formula

Year (Get ( CurrentDate )) - birthday year

and now you're talking about validated by calculation in a simple number field, which is a totally different beast.

• ###### 7. Re: ACTUAL AGE

Validation is only used to determine if you want to allow the value or not. If the value is updating as you say, it is likely a number field with an auto enter calculation.

You need to change it to a calculation, unstored with a number result. The options in the field calculation dialog should look something like this:

2 of 2 people found this helpful
• ###### 8. Re: ACTUAL AGE

My guess is that KKalach set up an auto-enter calculation into that number field. As I stated before, this won't update like you need.

Change the field type to calculation--you won't even need to re-enter the calculation. And then open the editor and change the storage options as we have directed you to do.

• ###### 9. Re: ACTUAL AGE

Thank you all very much.  Changing to a calculation worked great.  I am using an already created database that I was not involved with.

You guys are a great resource.

Karen Kalach

Assistant to Bill Mann

LPL Financial

203-271-3192

www.thefinancialarchitect.net<http://www.thefinancialarchitect.net>