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

Issue comparing dates in flow

What I am wanting to do is compare the ConvertedTermDate to the formatDateTime function. If the dates are the same I want it to delete the current item and create it in a different list and then delete that item.The function is formatDateTime(utcNow(), 'mm/dd/yyyy'). Both dates are in the same format. Any help would be greatly appreciated.

 

https://imgur.com/4hljSvJ

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Issue comparing dates in flow

Hi @ knewman0303,

 

Could you please share more details about the "ConvertedTermDate" that you mentioned? Is it a date type column in a sharepoint list(A)?

Do you want to compare the ConvertedTermDate with the current date and if the ConvertedTermDate is equal to today's date, then delete the item in the sharepoint list (A) and create the item in the sharepoint list (B)?

Would you trigger the flow when an item is created in the sharepoint list (A)?

 

If all my guess are right, you could refer to screenshot below to create the flow:

1.png

 

The expression in the condition as screenshot below:

@equals(formatDateTime(triggerBody()?['ConvertedTermDate'], 'MM/dd/yyyy'), formatDateTime(utcNow(), 'MM/dd/yyyy'))

 

 

 When a item is created in the listA, and the date of the ConvertedTermDate column is equal to today's date, the flow would run successfully as below:

Capture.PNG

 

 

Regards,
Alice Zhang

anhthuch4ng
Level 8

Re: Issue comparing dates in flow

Hi @knewman0303,

 

Have you had a chance to apply @v-yuazh-msft's suggestions to your Flow described above?

If yes and you found that solution to be satisfactory, please go ahead and mark @v-yuazh-msft's reply as the "Accepted Solution". 🙂


Happy Flowing,

-AT (Flow Community Admin)

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Users online (4,943)