Comparing dates with greater or less than

Compare dates using conditions in Power Automate

When you compare dates in Power Automate conditions, you will quickly hit some difficulties.

Power Automate is great to create your business processes. Using conditions, you can move into different parts of your process depending on data that is found by your flow. All easy, but then you start looking at comparing dates and quite quickly you will hit some troubles.

Conditions in Power Automate

I started by creating a Condition following the Manually trigger a flow trigger. I can now select the is greater than operation.

Compare Dates from a Manually trigger a flow trigger

No problem there.

Compare dates in  Power Automate

Now I’m doing the same with a trigger in the SharePoint connector.

Comparing dates from a SharePoint trigger don't show all comparison operations

Hmm, there are very limited options there.

Compare dates with ticks function

The solution is easy. (Thank you Serge Luca for the idea!)

ticks function on triggerBody

Now I just have to do add the ticks function to both sides of the condition. Suddenly all the comparison options appear. And now I can use all the options that I may need for date comparisons as the ticks function turns the dates into a number representing the date.

greater than comparison with ticks and dates

One thought on “Compare dates using conditions in Power Automate

  1. commented on June 24, 2019 by BigJoe

    Thanks for this! I was having a nightmare with dates from a Sharepoint list and using a condition, was getting all sorts of strange results but using the tick function fixed it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: