Help

Re: Calculating Age on a Given Date

Solved
Jump to Solution
4367 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Philip_Barber
7 - App Architect
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.

DATETIME_DIFF(TODAY(01-11-2019),{DOB LInk},‘Y’)

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.

0d41b7239ab01c5f5e8f76a7f7d714f76ba86a36.png

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

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

Phil

Antonia_Lavende
5 - Automation Enthusiast
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

Yes I have. They are marking Error.image

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

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

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

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

Kleusa
4 - Data Explorer
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.

Kleusa_0-1720137523650.png

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!
Obrigado desde já!!