web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Age Calculation

(0) ShareShare
ReportReport
Posted on by

I have a date column that contains the date of birth, based on this I want to use Flow to determine the age in years, months and days. So for example if the date is 24/11/2014, the output would be "4 Years, 4 Months and 10 Days" etc. 

 

Any help on the expression I need to use to acheive this please?

Categories:
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @ash58 ,

     

    DateDiff function which could be used to calculate number of days between two dates is currently not available in Microsoft Flow, there are similar requests on Flow Ideas Forum, please vote and comment the idea at here:

    https://powerusers.microsoft.com/t5/Flow-Ideas/Missing-Calculate-Number-of-days-between-two-Dates/idi-p/191380?advanced=false&collapse_discussion=true&filter=location&location=idea-board:FlowIdeas&q=datediff&search_type=thread

     

    About your scenario, we could calculate Years between two years, but I am afraid that it is might be not easy to get Months and Days.

     

    I have created a flow likes below to get Years between two dates with the following code:

    div(div(sub(ticks(utcNow('yyyy-MM-dd')),ticks(triggerBody()['date'])),864000000000),365.25)

    1.PNG

     

    Best regards,

    Mabel

     

  • gamoraes Profile Picture
    1,040 on at

    Hi @ash58 .

     

    I have made a video to show how get years, but is in portuguese. If you follow that steps you can get what you want!

     

    https://www.youtube.com/watch?v=kbG7r48gVuc

     

    In summary, you can use the the sub function to substract actual year, month and day from the birthday year, month and day. Doing this you'll resolve this

  • gamoraes Profile Picture
    1,040 on at

    Hi @ash58 

     

    You got it?

     


  • MarkStokes Profile Picture
    561 on at

    Oh wow.

     

    I thought this was going to be easy, but it's a lot harder than I expected?

     

    I'll take the challenge on!

     

    - Mark

  • gamoraes Profile Picture
    1,040 on at

    No is to simple, but no is to complex, rs.

     

    To you @MarkStokes will be super easy 😄

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard