14 Replies Latest reply on Apr 6, 2016 7:50 AM by kkalach

# calculating actual age this year.

I want actual age this year not actual age.  Any suggestions?

Let([

now = Get( CurrentDate ) ;

presentyear = Year( now ) ;

birthyear = Year( birthdate ) ;

birthday_thisyear = Date( Month( birthdate ) ; Day( birthdate ) ; Year(now) )

];

presentyear - birthyear -

// reduce result by 1 if birthday didn't take place this year

If( now < birthday_thisyear ; 1 )

)

• ###### 1. Re: calculating actual age this year.

kkalach:

You might check Extensitech's calculation: Age from dob

You can find several posts on this idea though (with a search): https://community.filemaker.com/search.jspa?q=age+dob

I hope this helps!

TSPigeon

FileMaker, Inc.

• ###### 2. Re: calculating actual age this year.

kkalach,

If I understand you correctly, you are trying to get what age somebody will be this year regardless if their birthday has arrived yet?

If so:

Let [

now = Year ( Get ( CurrentDate ) )

birthyear = Year ( Get ( YourTable::Birthdate_Field ) )

];

now - birthyear

HTH

Jesse

• ###### 3. Re: calculating actual age this year.

Not working yet.

Let [

now = Year ( Get ( CurrentDate ) )

birthyear = Year ( Get ( YourTable::Birthdate_Field ) )   DOES THE FIRST BIRTHYEAR NEED TO BE A FIELD.  I PUT AS A FIELD AND IT IS ASKING FOR A NUMBER

];                                                                                I PUT MY BIRTHDAY YEAR FIELD IN AFTER THE GET ALSO

now - birthyear

Karen Kalach

Assistant to Bill Mann

LPL Financial

203-271-3192

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

• ###### 4. Re: calculating actual age this year.

kkalach:

First, make sure your "birthdate" field is a Date field.

Once confirmed, then you can simplify the calculation to:

Year ( Get ( CurrentDate ) ) - Year ( birthdate )

Let me know if you need additional clarification.

TSGal

FileMaker, Inc.

• ###### 5. Re: calculating actual age this year.

kkalach wrote:

I want actual age this year not actual age.

What does this mean?

Your function looks like it's just trying to get age as of today. TSPigeon already pointed you to one of my posts with such a calc, which in turn points to others. (As mentioned in my post, this question seems to come up about once a week, and get answered each time as though it's a brand new challenge. This is a mystery to me. But I digress.)

I can only assume you're trying to do something that's subtly different, but I'm not understanding what that subtle difference is. Can you clarify?

I was born 12/28/69. What is my "actual age this year" if it's not my "actual age" as of today?

Chris Cain

Extensitech

• ###### 6. Re: calculating actual age this year.

So basically I am working with a  database already created by someone else.  The birthday was entered as separate number fields

birthday Month

birthday Day

birthday Year

So I am basically only going off the birthday year - now (current date)  and I am still getting current birthday.  I want it to say how old I will be this year 2016.

So if I was born in 1976 it is now 2016, I will be 40 this year, regardless of the month I was born or what month it currently is.    It still comes up that I am 39.

I have changed the birthday year to a date but it is look for mm/dd/yyyy. So I changed back to a number field.

I am trying, but I am not a pro yet.

Karen Kalach

Assistant to Bill Mann

LPL Financial

203-271-3192

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

• ###### 7. Re: calculating actual age this year.

kkalach:

Then the calculation would be:

Year ( Get ( CurrentDate ) ) - birthday Year

Make sure this is an unstored calculation.  That is, when you are in the Specify Calculation window, click the button "Storage Options..." near the bottom, and in the Storage Options for the field, enter a checkmark in the checkbox next to "Do not store calculation results -- recalculate when needed".

TSGal

FileMaker, Inc.

• ###### 8. Re: calculating actual age this year.

Perfect..That one worked.

Now another question,  I have been working on a copy of our database to basically revamp the current layout.  Can I bring in a current copy of our database (say as of todays date) into this new document that I have been working on so all the update information is there....like if people got deleted or info added?

Karen Kalach

Assistant to Bill Mann

LPL Financial

203-271-3192

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

• ###### 9. Re: calculating actual age this year.

kkalach:

You can import the records from the older file into the newer file.  With the new file open, pull down the File menu and select "Import Records -> File...".  You will then be prompted for a file.  Find and select your older file and click Open.  You can then select the table from the original file to match to the table in the new file, and if you have existing records, you can either select the Import Action "Update existing records in found set" or "Update matching records in found set".  Assuming you added new records to one of the files, also select the option "Add remaining data as new records".

Let me know if you need additional clarification.

TSGal

FileMaker, Inc.

• ###### 10. Re: calculating actual age this year.

Thank you so much for your help!  I am not there yet...I am working on containers and adding documents!

But when I get there and need help I will definitely ask.

This has been quit a learning experience!  It has been fun!

Karen Kalach

Assistant to Bill Mann

LPL Financial

203-271-3192

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

• ###### 11. Re: calculating actual age this year.

kkalach wrote:

So if I was born in 1976 it is now 2016, I will be 40 this year, regardless of the month I was born or what month it currently is.    It still comes up that I am 39.

2016 - 1976 is 40. However, you won't be 40 until your birthday passes this year.

So, with my birthday being 12/28/69, your calculation should show me as 47 all year long, even though I won't actually turn 47 until three days before 2017? This seems an odd requirement. Aren't I getting old fast enough?!

If that's what you want, though, then

Year ( Get ( CurrentDate ) ) - Year ( yourDateOfBirthField )

would get you want you want, presuming yourDateOfBirthField is actually a date field.

To get someone's actual age as of today, though, see the link(s) provided earlier.

HTH

Chris Cain

Extensitech

• ###### 12. Re: calculating actual age this year.

I am all set.  thanks for your help!

Karen Kalach

Assistant to Bill Mann

LPL Financial

203-271-3192

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

• ###### 13. Re: calculating actual age this year.

Good morning,  I have watched and look at several discussions on containers.  I have created a container and have dragged a pdf document into it.  I am using FM14.  I want to see the document front page with out the scroll bar or the document type on left side.  and I want to be able to click on I and open in another window in adobe.  Can you please help me with this.  I have document as interactive and fit to window but still not working.  Thanks

Karen Kalach

Assistant to Bill Mann

LPL Financial

203-271-3192

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

• ###### 14. Re: calculating actual age this year.

I am going to start this as a new discussion.  sorry

Karen Kalach

Assistant to Bill Mann

LPL Financial

203-271-3192

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