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

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

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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (6,291)