Skip to main content
Solved

Formula to calculate employee's seniority in years and months

  • March 9, 2022
  • 5 replies
  • 54 views

Forum|alt.badge.img+3

Hi!
First of all, I am french so I hope you’ll understand my question. :hugs:
I’d like to calculate how long has an employee been with the company, so : since entry date (fr: date d’embauche) until now/today.

I already have a formula that calculates the number of years (fr: années) and another formula that calculates the number of months (fr: mois) but I’d like to have these informations in one formula.
Is that possible ?

Thanks !


Best answer by kuovonne

IF(
    {Birthdate},
    CONCATENATE(
        DATETIME_DIFF(TODAY(), {Birthdate}, "years"),
        " années ",
        MOD(
            DATETIME_DIFF(TODAY(), {Birthdate}, "months"),
            12
        ),
        " mois"
    )
)

5 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • March 9, 2022

Welcome to the Airtable community!

Try TONOW({date d’embauche}) and see if that is what you want. The result will probably be in English, though.


Forum|alt.badge.img+3
  • Author
  • New Participant
  • March 9, 2022

Welcome to the Airtable community!

Try TONOW({date d’embauche}) and see if that is what you want. The result will probably be in English, though.


Omg it worked, thank you so much !!


Forum|alt.badge.img+3
  • Author
  • New Participant
  • March 10, 2022

Welcome to the Airtable community!

Try TONOW({date d’embauche}) and see if that is what you want. The result will probably be in English, though.


Hi again!

Do you think there is a way to have the number of years AND months calculated for each person?
For example (screenshot bellow), the first line, this person has been with the company for 12 years and 6 months, not 13 years. Is there a way to get more accurate results or am I asking too much? :smiling_face_with_tear:

Thank you in advance**


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • March 10, 2022
IF(
    {Birthdate},
    CONCATENATE(
        DATETIME_DIFF(TODAY(), {Birthdate}, "years"),
        " années ",
        MOD(
            DATETIME_DIFF(TODAY(), {Birthdate}, "months"),
            12
        ),
        " mois"
    )
)

Forum|alt.badge.img+3
  • Author
  • New Participant
  • March 11, 2022
IF(
    {Birthdate},
    CONCATENATE(
        DATETIME_DIFF(TODAY(), {Birthdate}, "years"),
        " années ",
        MOD(
            DATETIME_DIFF(TODAY(), {Birthdate}, "months"),
            12
        ),
        " mois"
    )
)

You are genius thank you sooooo much!!! And it’s in French! :partying_face: