cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
onyebuchiboss
Level: Powered On

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

Re: How to compare dates in the condition

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

Re: How to compare dates in the condition

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

onyebuchiboss
Level: Powered On

Re: How to compare dates in the condition

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

Re: How to compare dates in the condition

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

onyebuchiboss
Level: Powered On

Re: How to compare dates in the condition

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

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

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 99 members 3,775 guests
Please welcome our newest community members: