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 Automate
Answered

If Bigger Date

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey all,

 

I'm using Microsoft Flows, and I want to know if the date 1 is bigger than date 2, but it is not working:

 

@greater(formatDateTimeitems('Apply_to_each')?['OData__PipeExpectedVisitDate'],'yyyy-MM-dd'), formatDateTime(items('Apply_to_each')?['OData__PipeDealVisitedDate'],'yyyy-MM-dd'))

 

it gives me this error:

The template validation failed: 'The template action 'Condition' at line '1' and column '1604' is not valid: "Unable to parse template language expression 'greater(formatDateTimeitems('Apply_to_each')?['OData__PipeExpectedVisitDate'],'yyyy-MM-dd'), formatDateTime(items('Apply_to_each')?['OData__PipeDealVisitedDate'],'yyyy-MM-dd'))': expected token 'EndOfData' and actual 'Comma'.".'.
 
Help please
 

 

Categories:
  • Verified answer
    v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @ Sababneh,

     

    Could you please share more details about the error?

    What is the type of the “OData__PipeExpectedVisitDate” column and “OData__PipeDealVisitedDate” column?

     

    I found that your expression is missing a parenthesis “(” , you could add a “(” in your expression as below:

    @greater(formatDateTime(items('Apply_to_each')?['OData__PipeExpectedVisitDate'],'yyyy-MM-dd'), formatDateTime(items('Apply_to_each')?['OData__PipeDealVisitedDate'],'yyyy-MM-dd'))

     

    Please check the expression that you used in your flow.

     

    I have create a flow add use the expression above as screenshot below:

    1.png

    The flow would run successfully as below:

    2.png

     

     

     

    Regards,
    Alice Zhang

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you @v-yuazh-msft

     

    It worked just fine 🙂

     

    Btw the columns were Date Type.

     

    Thank you again.

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 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard