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 / difference between dates
Power Automate
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 

Categories:
I have the same question (0)
  • StretchFredrik Profile Picture
    3,395 Super User 2025 Season 2 on at

    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.
  • Community Power Platform Member Profile Picture
    on at

    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
    3,395 Super User 2025 Season 2 on at

    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. 
  • Verified answer
    StretchFredrik Profile Picture
    3,395 Super User 2025 Season 2 on at

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

  • Community Power Platform Member Profile Picture
    on at

    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

  • StretchFredrik Profile Picture
    3,395 Super User 2025 Season 2 on at

    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

    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
    3,395 Super User 2025 Season 2 on at

    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

    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 

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard