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
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,221)