cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jamesantony Advocate I
Advocate I

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

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

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

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

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (8,153)