Skip to main content
Solved

Help calculating age (since date)

  • September 9, 2021
  • 2 replies
  • 29 views

Forum|alt.badge.img+4

Hello, I’m trying to get a formula working to determine age in years with one decimal place. The date is in a column called “Created”, the formula I’ve got is:

DATETIME_DIFF(TODAY(), Created,'years') & ' years'

Can anyone help add the decimal place so the result for example is “1.2 years”?

Thank you.

Best answer by kuovonne

DATETIME_DIFF will only return whole years. It will not return a decimal. If you want a decimal, you should find the age in months or days, and then convert the result to years manually.

2 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • September 9, 2021

DATETIME_DIFF will only return whole years. It will not return a decimal. If you want a decimal, you should find the age in months or days, and then convert the result to years manually.


Forum|alt.badge.img+4
  • Author
  • Participating Frequently
  • September 9, 2021

DATETIME_DIFF will only return whole years. It will not return a decimal. If you want a decimal, you should find the age in months or days, and then convert the result to years manually.


Thanks for the suggestion, if possible I’ll avoid overcomplicating it, so I decided to just make it count the number of months.