Skip to main content

Different date format dd,mm,yyyy to calculate age

  • April 11, 2020
  • 2 replies
  • 36 views

Forum|alt.badge.img+3

Hi i am in New Zealand and our date format is dd,mm,yyyy and I am trying to calculate years and months using this code: DATETIME_DIFF(TODAY(), {Date Of Birth}, ‘years’) & ’ years, ’ & MOD(DATETIME_DIFF(TODAY(), {Date Of Birth}, ‘months’), 12) & ’ months’. It is working however only on this date format (mm,dd,yyyy) how can i change this so it works for me please?

2 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • April 11, 2020

The format for displaying dates should not affect the date calculations, as Airtable internally stores all dates in ISO 8601 format.

What is the field type for {Date Of Birth}?
If it is a Date field, what is the date format?

Can you show some specific examples where Airtable is producing the incorrect results?


Forum|alt.badge.img+3
  • Author
  • New Participant
  • April 11, 2020

The format for displaying dates should not affect the date calculations, as Airtable internally stores all dates in ISO 8601 format.

What is the field type for {Date Of Birth}?
If it is a Date field, what is the date format?

Can you show some specific examples where Airtable is producing the incorrect results?


Oh great I have changed the Date format thank you so much that worked