cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
onyebuchiboss
Helper III
Helper III

How to compare dates in the condition

Hi All, 

I am getting the list of records in dynamics and comparing dates (end date >= enddate(+14)) in the condition before updating records in the results. But I am having problems adding 14 dyas to the end dates in the condition. I have seen other solutions on here, but i cant not find the end date field when i try to create a function in the second date to add 14days to it.  Please look at the image below:capture.png

1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Dual Super User II
Dual Super User II

Hi @onyebuchiboss 

 

You would have to use expressions

 

Try 

addDays(items('Apply_to_each')?['columname'],14)
 
columname - name of column to aldd 14 days to
in your case "EndTime" - check internal name
 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

4 REPLIES 4
RezaDorrani
Dual Super User II
Dual Super User II

Hi @onyebuchiboss 

 

You would have to use expressions

 

Try 

addDays(items('Apply_to_each')?['columname'],14)
 
columname - name of column to aldd 14 days to
in your case "EndTime" - check internal name
 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi @RezaDorrani, the requirement is to update all record 14days after endtime(datefield). Do you think your solution would filter the records based on the requirement I just stated?

Hi @onyebuchiboss 

 

For that you would have to do a date comparison using ticks function in Flow

 

Here is a blog post that explains the ticks function and date comparison

https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Flow-Calculate-Date-Diference/ba-p...

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

@Reza, this worked. i had the following in my condition 

UTCNOW()  >= addDays(items('Apply_to_each')?['columname'],14).

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.

Users online (5,021)