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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Condition Between date...
Power Automate
Unanswered

Condition Between dates issue

(0) ShareShare
ReportReport
Posted on by 792
Hi Community
 
I have a condition I'm stuck on and hoping someone can offer some support.
 
I have a flow that gets date information from a SP list and I want it to check some conditions before moving forward.
I want it to check date (Period From) if it is greater than date (Start Date) and less than date (End Date)
I also want it to check date (Period To) if it is greater than date (End Date) and less than date (StartDate)
 
 
I have used the following expressions in a condition but they throw back false so im slightly lost.
 
and(
greater(outputs('PERIOD_TO'),outputs('START_OF_ARCHIVE')),
less(outputs('PERIOD_TO'),outputs('END_OF_ARCHIVE')))
 
 
and(
greater(outputs('PERIOD_TO'),outputs('START_OF_ARCHIVE')),
less(outputs('PERIOD_TO'),outputs('END_OF_ARCHIVE')))
Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,908 Super User 2025 Season 2 on at
    Condition Between dates issue
    Please show how you have configured your flow. What you provided is somewhat helpful, but showing the configuration of the flow is more helpful. Based on what you've provided so far, you don't show the format of the dates. To use logic on dates, the dates must be formatted with the ISO8601 date format (yyyy-MM-dd) or it will not work.
     
    Maybe I am missing something, but the two expressions highlighted in yellow look identical to me.  What is the significance of showing this twice?
  • Kmayes Profile Picture
    792 on at
    Condition Between dates issue
    @David_MA Apologies for the late reply but that you for responding :)
     
    It looks like the code pasted incorrectly for some reason it should have posted as and just the once:
    and(
    greater(outputs('PERIOD_FROM'),outputs('START_OF_ARCHIVE')),
    less(outputs('PERIOD_TO'),outputs('END_OF_ARCHIVE')))
     
     
    The flow is configured as below:
     
    the date in the period from is:
    formatDateTime(outputs('Get_item')?['body/PeriodFrom'],'dd-MM-yyyy')
     
    the date in the period to is:
    formatDateTime(outputs('Get_item')?['body/PeriodTo'],'dd-MM-yyyy')

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard