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

Need Help with date comparison

Hi there,

 

I am creating an app to capture service anniversary dates in Sharepoint.

In Flow I have a scheduler that runs every day 00:00 and it should pick the service date in each record and compare it with current date. if it matches then it should send an email.

 

Sounds simple and I am fairly new to Flow so struggling a lot. Please help.

 

I tried with this - but it says the format is wrong. and I dont know if I need the apply to each or items etc. please shed some light experts.

 

@Equals(ticks(formatDateTime(items('Apply_to_each')?['Service_x0200_Date'])), ticks(utcnow())

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-zhos-msft
Level 10

Re: Need Help with date comparison

Hi @jamesantony ,

Are the service anniversary dates stored in the SharePoint list?

Here I have made a test on side, the dates are come from a list column.

The expression in the condition is:

formatDateTime(items('Apply_to_each')?['Service_x0020_date'],'yyyy-MM-dd')
is equal to
formatDateTime(utcNow(),'yyyy-MM-dd')

 

Capture2.PNG

Best Regards,

Community Support Team _ Zhongys

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

2 REPLIES 2
v-zhos-msft
Level 10

Re: Need Help with date comparison

Hi @jamesantony ,

Are the service anniversary dates stored in the SharePoint list?

Here I have made a test on side, the dates are come from a list column.

The expression in the condition is:

formatDateTime(items('Apply_to_each')?['Service_x0020_date'],'yyyy-MM-dd')
is equal to
formatDateTime(utcNow(),'yyyy-MM-dd')

 

Capture2.PNG

Best Regards,

Community Support Team _ Zhongys

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

v-zhos-msft
Level 10

Re: Need Help with date comparison

Hi @jamesantony ,

Are the service anniversary dates stored in the SharePoint list?

Here I have made a test on side, the dates are come from a list column.

The expression in the condition is:

formatDateTime(items('Apply_to_each')?['Service_x0020_date'],'yyyy-MM-dd')
is equal to
formatDateTime(utcNow(),'yyyy-MM-dd')

 

Capture2.PNG

Best Regards,

Community Support Team _ Zhongys

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

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!

Top Kudoed Authors
Users Online
Currently online: 52 members 3,392 guests
Please welcome our newest community members: