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 check dat...
Power Automate
Suggested Answer

Condition to check dates on a spreadsheet returning expressionResult as false

(2) ShareShare
ReportReport
Posted on by 12
i have a flow which checks the date of a column in a spreadsheet table and will trigger a condition if it matches todays date.
 
the way the spreadsheet is populated is from a MS Forms which a person submits the date.
 
the date format in the spreadsheet looks like this
With the column format set as Date
 
My flow gets the date column from 'Add a row into a table' which returns the output and the DateTime Format is set to ISO 8601.
 
my condition is setup to get that info from the dynamic content and equal to expression below
 
 
The flow runs successfully but always returns as false for the date condition.
Am i missing some sort of formatting in the expression to check for current date? or should i not get the dates column from the 'Add a row into table' flow but instead 'Get response details'?
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,978 Moderator on at
     
    you would need to do a 
     
    formatDateTime(utcNow(), 'yyyy-MM-dd')
     
    AND
     
    formatDateTime(excel property, 'yyyy-MM-dd')
     
    So add the formatDateTime expression to your body/from and they will match IF they do :-)
     
    If this helps resolve your issue, I'd appreciate if you Marked as such and maybe a like.
     
    Cheers
  • CU10042333-0 Profile Picture
    12 on at
    so just to clarify add 'formatDateTime(utcNow(), 'yyyy-MM-dd')' together with the body/from dates and then make it is equal to 'formatDateTime(excel property, 'yyyy-MM-dd')'?
     
    or do you mean add another condition expression under my existing?
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,978 Moderator on at
     
    Sorry its super late for me.
     
    • Change this 
      • to  formatDateTime(excel property, 'yyyy-MM-dd')
      • Just remember to put your body/From Dates in the place where I wrote excel property
     
     
    • Then change your formatDateTime(utcNow() on the right) to formatDateTime(utcNow(), 'yyyy-MM-dd')
     
    This will make them both formatted the same and remove the Time values on the body/from dates which will never match UTC now
     
    Hope that clarifies.
     
    If so :-) please mark as resolved for me please and maybe a like
     
    Cheers!!!
  • CU10042333-0 Profile Picture
    12 on at
    thanks, so the expression gives me this error
     
    ive also made sure the excel spreadsheet 'From Dates' column is in custom format to match ISO8601. Not sure if this is the correct way?
  • Michael E. Gernaey Profile Picture
    53,978 Moderator on at
     
    Please show me what you typed in and did you make sure to turn on the ISO option on your List rows as I said?
     
    Did you turn it on the Action like this, at the bottom, you have to set that to get the right data format.
     
  • CU10042333-0 Profile Picture
    12 on at
    ive used "Add a row into a table" which has dateformat in ISO
     
    condition
     
    is equal to
     
  • Michael E. Gernaey Profile Picture
    53,978 Moderator on at
     
    This should work, so it tells me either the other side is not a date specifically or something is not getting typed correctly.
     
    Is the Column a Calculated Column by chance? even though it's a date per se, is it calculated?
     
    Then can you please show me the Run itself that failed or didn't do what you wanted.
     
    We need to see the runtime values.
     
    Open the run and go to the Condition
    Grab the Raw Input and show that here please.
     
    And I noticed you still have mm not MM as my example for month
  • CU10042333-0 Profile Picture
    12 on at
    no the columns doesnt have a sum or calculations if thats by what you mean.
     
    Could if be the way the excel spreadsheet is getting the information from the MS Forms?
    This is what the forms sheet looks like and the person will input the date via the date picker
     
    i dont get a raw input of the condition after a run, im assuming because it has failed? or are you talking about the code view?
    i tried moth MM and mm but same failure.
     
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,978 Moderator on at
     
    Yeah something else is going on.
     
    I literally used another users Excel that they sent me(which i dont usually do) and even if they didn't the code I gave you is the correct code.
     
    SO here is what I want to ask you please.
     
    Add 4 compose actions, just humor me please.
     
    1. Put in the raw excel body property nothing else so I can see the raw data
    2. In the second, put utcNow() thats it <== as an expression 
    3. In the 3rd I want you to put formatDateTime(utcNow(), 'yyyy-MM-dd')
    4. 4rth please put formatDateTime(yourdynamicproperty, 'yyyy-MM-dd')
     
    I believe I know the issue now, but if you can do this please. then share a picture of those 4 things values please, as well as their matching Expression in the code view.
     
    Please and thank you 
     
  • CU10042333-0 Profile Picture
    12 on at
    thanks,
    ok have added 4 compose actions with your details.
    i get the same error on the last compose
     
    compose 1
    code view
     
    compose 2
    code view
     
    compose 3
    code view
     
    compose 4
    code view
     
    the error on the last compose
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard