cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Sababneh
Level: Powered On

If Bigger Date

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
 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: If Bigger Date

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

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: If Bigger Date

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

View solution in original post

Sababneh
Level: Powered On

Re: If Bigger Date

Thank you @v-yuazh-msft

 

It worked just fine 🙂

 

Btw the columns were Date Type.

 

Thank you again.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 438 members 6,159 guests
Please welcome our newest community members: