web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Condition to compare d...
Power Automate
Unanswered

Condition to compare dates in sharepoint

(1) ShareShare
ReportReport
Posted on by 28

Hi All

 

I am trying to create a flow that is coping items from one SharePoint to another by comparing today's date to the date of the item and if matches it copied the entire item to a different list

Comparing 

this is my condition: 

formatDateTime(triggerBody()?['Start_x0020_Date_x0020_At_x0020_'],'yyyy-MM-dd')  is equals to formatDateTime(utcNow(),'yyyy-MM-dd')
It does not seem to work this way...anyone have a better understanding of how to accomplish that?
 
Please help
 
 

 

Categories:
  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @rory99 :

    You probably want to use the equals expression which you'll find under logical functions:

    equals(formatDateTime(triggerBody()?['Start_x0020_Date_x0020_At_x0020_'],'yyyy-MM-dd'),formatDateTime(utcNow(),'yyyy-MM-dd'))
     
    If this addresses your issue, please mark your post as Solved.
     
    Scott
  • rory99 Profile Picture
    28 on at

    Maybe I'm missing something here...my condition looks like this:

     

    Capture.PNG

    how do I change it to a logical function?

  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @rory99 

    I did not realize that you had this is a condition as there was no screen shot.

     

    I don't see anything wrong with your logic or formatting.

     

    When you say it doesn't work, are you saying that is never true or are you saying that it errors out?

     

    One suggestion that I have:

    Create two string variables.  Set the values of each string variable to the results of one of your formatDateTime expressions.  Run the Flow and view the results in the history.  Do the values in the variables appear to be the same?

     

    Scott

  • rory99 Profile Picture
    28 on at

    Hi Scott

     

    It does not work since the condition result is always false

    I actually tried to create two differetn strings and did see that they indeed match for some of the items

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 335 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard