Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

difference between dates

(0) ShareShare
ReportReport
Posted on by

Hello community,
I am new to the power automate and i need to find the difference between two dates and update it in the desired column. Here every thing is working smoothly but i am not able to derive the expression for subtracting two dates can some one can help me out .

Thanks in advance 

  • Community Power Platform Member Profile Picture
    on at
    Re: difference between dates

    Hello @StretchFredrik ,
    Thanks for the early reply your solution is good but is there a way to provide a cancel button or any other function because writing mail is not what my boss want and its not convenient  way it will be very helpful.
    Thanks In Advance 

  • StretchFredrik Profile Picture
    2,628 Super User 2025 Season 1 on at
    Re: difference between dates

    Since i dont know what the whole solution looks like its pretty hard to know what works best here, but the most basic is probably to have the Original flow send a email (as confirmation), and if they wish to cancel it, they can respond to that email. Then you can have another flow Triggering on when a email arrives with that header, get the user that sent it, and edit the place where you store the vacation.

     

    Hopefully you understand what my idea is. 

  • Community Power Platform Member Profile Picture
    on at
    Re: difference between dates

    Hello @StretchFredrik  can you please elaborate the solution little bit like what type of link or button it will help me to understand and implement.
    Thanks in Advance

  • StretchFredrik Profile Picture
    2,628 Super User 2025 Season 1 on at
    Re: difference between dates

    I would probably send a button or link in Teams to the user as part of the first  flow and have another flow to cancel the vacation request. 

  • Community Power Platform Member Profile Picture
    on at
    Re: difference between dates

    Thanks @StretchFredrik ,
    One more question is i have created the Microsoft form  for leave request and every thing works perfectly but i am not able to add the cancel option in forms and also in my flow any solution for it.
    In simple terms i need to add cancel function for an employee to cancel his/her vacation.
    Thanks in advance

  • Verified answer
    StretchFredrik Profile Picture
    2,628 Super User 2025 Season 1 on at
    Re: difference between dates

    And just make the flow run every day to check the list.

  • StretchFredrik Profile Picture
    2,628 Super User 2025 Season 1 on at
    Re: difference between dates

    Well then you can do what i wrote above,

     

    Make a IF statement, in that if statement put ur event date in the left column, then chose "Less or equal to" and right column 

    addDays(utcNow(),-X,'yyyy-MM-dd')
     
    replace the X above with the number of days ahead you want. 
  • Community Power Platform Member Profile Picture
    on at
    Re: difference between dates

    Hello @StretchFredrik ,
    Thanks for the spontaneous reply what i want is i  wanna automate flow like if the start date of event is 11/2/22 i need my flow to trigger before some days as  reminder to responder .i hope i am able to explain.
    Thanks in advance

  • StretchFredrik Profile Picture
    2,628 Super User 2025 Season 1 on at
    Re: difference between dates

    Do you want something done lets say 14 days from a specific date?

     

    If so what i usually do is make a IF statement, left column is the date i want to check, then i use "Less or equal to" and the right column 

    addDays(utcNow(),-14,'yyyy-MM-dd')
     
    This checks if its been 14 days or more.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow