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 / Compare date - Today a...
Power Automate
Unanswered

Compare date - Today and value

(0) ShareShare
ReportReport
Posted on by 8

Hello!

 

Could you help me out? I am looking for a solution for comparing 2 dates.

Condition

22.03.2017 less or equals [today]

 

@lessOrEquals(item()?['CHECKFROM'], '??????????????')

 

Thank you

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi Chs,

     

    I configured a flow to send an email when the Date column in the list is less than or equal to Today. My flow configuration looks like below:
    6.PNG


    Then when an item is created, if the data is less than or equal to Today, an email would be sent.

     

    In the SharePoint list, the Date column is Date only format. What’s your data source? If you are also using SharePoint list, please make sure to configure the Date/Time column as Date only format.

     

    Please try to configure the Condition with the formula as following:
    @lessOrEquals(triggerBody()?['Date'], formatDateTime(utcnow(),'yyyy-MM-dd'))

     

    The workflow definition contains the actual logic that executes as a part of your logic app. This includes one or more triggers that initiate the logic app, and one or more actions for the logic app to take. Hope this documentation about Workflow Definition Language could be a reference for you:
    https://docs.microsoft.com/en-us/rest/api/logic/definition-language

     

    Please try it on your side and let me know if it works for you.

     

    Best regards,
    Mabel Mao

  • westerdaled Profile Picture
    649 on at

    Hi

     

     

    I have  a  smilar question. I want to calc the next annual date read from a worksheet . However, I am getting error  with this  syntax

     

    @equals(item()?adddays(['Last_x0020_Service_x0020_Date'],365) formatDateTime(utcnow(), 'dd-MM-yyyy' ))

    Has anybody had a similar issue?

     

    Daniel

  • Grahambo05 Profile Picture
    106 on at

    @westerdaled

     

    have you tried

     

    @equals(addays(item()?['Last_x0020_Service_x0020_Date'],365,'d')

  • efialttes Profile Picture
    14,756 on at

    I don't think it will work with leap years 😞

  • WDRC Profile Picture
    247 on at

    @v-yamao-msftyour expression

     

    @lessOrEquals(triggerBody()?['Date'], formatDateTime(utcnow(),'yyyy-MM-dd'))

     

    worked for me with a bit of modification for my case, thanks

     

    Andrew

  • WDRC Profile Picture
    247 on at

    @v-yamao-msft

     

    So I have this flow as below that runs sucessfully:

     

    flow pl.png

     

     

    This is linked to the below SP list:

     

    flow pl.2png.pngThe issue I have is the dates format.  So in the list it is set to a UK format, in the flow this gets converted into a UTC format.  When I use the date field in the email that the flow will send, this also gets inserted in the UTC format.  Is there anyway of modifying this to long format of 5 December 2018 so when it is used in the email it looks better and in the that long format. 

     

    Hope you can help.

     

    Regards,

     

    Andrew

     

     

  • etienneg Profile Picture
    14 on at

    So the short answer is, you can't really compare "dates" but rather you can only compare the date values formatted as a string together, which can set you off if don't know about it. 

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
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard