When working with date fields in Power Apps, you might often need to calculate a person’s age based on their Date of Birth. This can be easily done with Power Fx in a formula column.

In your formula columns, you can use the following formula to calculate age:

RoundDown(
    DateDiff('Date Of Birth', UTCNow(), TimeUnit.Years),
    0
)

Here, Date of Birth is your date column. UTCNow() function fetches the current date.

The DateDiff function is used to calculate the difference between the two given dates. The TimeUnit.Years parameter tells the function to return the difference in years.

The RoundDown function is used to round a number down to the nearest integer. For example, to convert the difference like 28.5 to 28.

age calculate column on the model driven app fom