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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (4,795)