cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

difference between dates

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 

1 ACCEPTED SOLUTION

Accepted Solutions
StretchFredrik
Super User
Super User

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

View solution in original post

9 REPLIES 9
StretchFredrik
Super User
Super User

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.
Anonymous
Not applicable

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
Super User
Super User

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. 
StretchFredrik
Super User
Super User

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

Anonymous
Not applicable

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
Super User
Super User

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. 

Anonymous
Not applicable

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
Super User
Super User

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. 

Anonymous
Not applicable

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 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (4,824)