# Re: Calculating Age on a Given Date

Solved
3989 0
cancel
Showing results for
Did you mean:
7 - App Architect

I am a real novice at formulas and I have been unable to work out what I have done wrong. Can somebody please tell me.

I am trying to return the age of a person based on the difference between the DOB and the date in the future. What I have here works sometimes but sometimes gives the incorrect age. The problem occurs if the dob is later in the year than todays date.

### AYM Festival test 2019 - Airtable

Explore the "AYM Festival test 2019 " base on Airtable.

Hopefully the link will show that the first age (for Jacob) is correct but the second line for (Peter) is one year out.

18 Replies 18
7 - App Architect

As Justin said the answer was in the thread and provided something I could not do myself.
Best of luck with it.

Phil

5 - Automation Enthusiast

Yes @Philip_Barber and @Justin_Barrett I tried pasting the formula in but it marked error. I do not need the date AS OF a specific date, or do I need to add a specific date?

for example what does DATE_TIME PARSE mean?

I used this example: DATETIME_DIFF(TODAY(11-18-2020),{DOB LInk},‘M’)/12

5 - Automation Enthusiast

Yes I have. They are marking Error.

7 - App Architect

Hi Antonia,

I am not an expert and I relied on somebody else in the community answering my question and the formula that they gave me is …. DATETIME_DIFF(DATETIME_PARSE(‘11-11-2019’,‘DD-MM-YYYY’),{DOB LInk},'Y’)

In my case the child gave their specific DOB and this then calculated what their age would be on a specific date in the future.

I hopes this helps

Phil

7 - App Architect

I have just been notified that “My reply to your problem has not been sent because they couldn’t find content” I my email!!!

If you want to see my formula please reply directly to me at phil.barber@sky.com and I will send it to you.
Regards
Phil

5 - Automation Enthusiast

Thank you!

Antonia Lavender
310.803.6854
Antonia@AntoniaLavender.com

I see two problems:

1. The ‘M’ string is using styled quotes. Airtable formulas only work with non-styled quotes. Notice the very subtle difference between ‘M’ and `'M'`.
2. You added numbers inside the call to the `TODAY()` function. `TODAY()` doesn’t accept any arguments. Even if it did you can’t just type a date and have it interpreted as a date.

The correct formula should be:

``````DATETIME_DIFF(TODAY(), {DOB Link}, 'M') / 12
``````
5 - Automation Enthusiast

Justin, you are a GODSEND! I figured it out and it works! Thank you!!

4 - Data Explorer

Gente, que post incrível!!
Começando do zero, consegui colocar as idades de óbito e atual para os vivos na minha tabela, como vocês podem ver.

Lendo aí em cima, vi que foi falado em colocar anos, meses e dias, mas não consegui fazer. Alguém pode me ajudar? Ficaria perfeito!