# Hola, como puedo hacer una formula para calcular la edad en años y meses?

Topic Labels: Formulas
Solved
1129 3
cancel
Showing results for
Did you mean:
4 - Data Explorer

1 Solution

Accepted Solutions
18 - Pluto

Usé Google Translate y dijo que te gustaría calcular la edad en años y meses. Si eso es correcto, echa un vistazo a esto*:

``````DATETIME_DIFF(
TODAY(),
Date,
"years"
)
& " years, "
& (DATETIME_DIFF(
TODAY(),
Date,
"months"
) -
DATETIME_DIFF(
TODAY(),
Date,
"years"
) * 12
)
& " months"``````

Base

*I used Google Translate and it said that you'd like to calculate age in years and months?  If that's correct, have a look at this:

3 Replies 3
18 - Pluto

Usé Google Translate y dijo que te gustaría calcular la edad en años y meses. Si eso es correcto, echa un vistazo a esto*:

``````DATETIME_DIFF(
TODAY(),
Date,
"years"
)
& " years, "
& (DATETIME_DIFF(
TODAY(),
Date,
"months"
) -
DATETIME_DIFF(
TODAY(),
Date,
"years"
) * 12
)
& " months"``````

Base

*I used Google Translate and it said that you'd like to calculate age in years and months?  If that's correct, have a look at this:

Hi,

just a suggestion - you can also use MOD ( ...months.., 12) for such expressions.

Oooh, you're right, that's a lot cleaner!