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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Calculate the differen...
Power Automate
Unanswered

Calculate the difference of years between two dates.

(0) ShareShare
ReportReport
Posted on by

Hi, 

I'm asking for help how to calculate the difference of years between two dates. I need to create a flow that will calculate the work experience and send an e-mail on the anniversary day. The problem is that I only have to send an email when someone have 1, 5 or 10 years anniversary. The data will be on sharepoint or excel. At the moment my flow looks like this:
If anybody could give me some tips I will be very thankful.

konradsiekacz_0-1655961458200.png
konradsiekacz_1-1655961545550.png

konradsiekacz_2-1655961589374.png

konradsiekacz_3-1655961638217.png

konradsiekacz_0-1655963060874.png

 


Best regards
Konrad 

 

 

Categories:
I have the same question (0)
  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @Anonymous  Please create 3 calculated columns in SharePoint List and these columns will be based on Hire date.

    Like FirstYearColumn would be = Hire Date + 365 day

    Then fetch these column details in flow with condition you are using.

    See more details about calculated columns- SharePoint Calculated Column formulas based on Date and Time | Gopenly

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @Hardesh15 ,

    thank you for answer. The question is right now how this solution will be working for leap year?

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @Anonymous  I do not understand why you are focusing on leap year here?. Suppose i joined one organization today 23rd June 2022, So my next five year date will be 23rd June 2027. 

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

     

     

  • Community Power Platform Member Profile Picture
    on at

    @Hardesh15 Thank you for answer again.
    I was wrong, you have a right it's doesn't  matter 🙂
    So my sharepoint list is looking like on the screen. Could you give me some advice how to working with date and conditions to check whether someone have 1, 5 or 10 years anniversary?

    konradsiekacz_0-1655969274331.png

     

  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @Anonymous  Use condition in your flow as you were doing previously. This time you will compare FirstYearAniversay is equal to Today date.

    Pls check your calculated column date format inflow otherwise condition will be false.

    Use utcnow('yyyy-MM-dd') for today date.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard