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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Conditions: How to eva...
Power Automate
Answered

Conditions: How to evaluate if a date has expired

(0) ShareShare
ReportReport
Posted on by 350

Hi all

I am working with an Excel Table stored in Google Drive and GetRows action. The Excel table structure includes several registers, one of the columns is a Date.

 

My problem is I cannot find the way to avaluate if such date has expired (i.e. less than today). I added a Contition, and read carefully the Workflow definition Language (https://msdn.microsoft.com/en-us/library/azure/mt643789.aspx), section "Date functions". I found a function that provides current date & time, but could not find any Date comparison function. Any suggestions?

 

THank you in advance!

 

Categories:
I have the same question (0)
  • Verified answer
    Coen Profile Picture
    53 on at

    Use a combination of the logical functions found on the same page. 

     

     

    Less

    Returns true if the first argument is less than the second. Note, values can only be of type integer, float or string.

     

    Not sure if your date field will be interpreted as any of the allowed formats though. 

  • Verified answer
    Samuel Profile Picture
    Microsoft Employee on at

    This should be achievable if you create a condition and flip it to advanced mode. In the advanced mode, you can use the same expression syntax that Logic Apps uses. Expression reference is here: https://msdn.microsoft.com/en-us/library/mt643789.aspx

     

    From there, it depends on the exact date format stored in Excel. If it's the usual ISO format (or similar), it will start like 2016-05-13 (i.e. year-month-day). If you just need an exact date match, other formats could work, but if you want to detect "earlier than" it will need to be a string sortable format (i.e. year before month before day).

     

    So, start by using the editor to do a basic comparison with the timestamp field, then switch to the advanced view. This will tell you how to reference the field you care about in the expression. I my example I chose to use a 'Created' time from the flow trigger when testing this.

     

    Then, to do the actual comparison, we can trim just the date part from the timestamp, and compare it against a custom-formatted utcnow expression. So putting this into the advanced condition did the trick for me to test if the date was today: @equals(substring(triggerBody()['Created'], 0, 10),utcnow('yyyy-MM-dd')) 

     

    If you need to check for previous dates instead, this should work: @less(substring(triggerBody()['Created'], 0, 10),utcnow('yyyy-MM-dd'))

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!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 239 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 177 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard