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 / Filter array for date ...
Power Automate
Answered

Filter array for date greater than today

(0) ShareShare
ReportReport
Posted on by 893 Super User 2026 Season 1
Hello - 
 
Trying to filter an array for records with Promotion Start Date greater than today.
I figured a basic query would work but it does not. It likely requires date formatting and a UTC expression, but I cannot get the syntax correct for an advanced query either.
 
Any suggestions?
 
Example input to the filter:
 
 
Basic filter that does not work:
My failed attempt to write advanced query:
@equals({formatDateTime(item()?['Promotion Start Date'],'yyyy-MM-dd')},{formatDateTime(addDays(utcNow()+1,'yyyy-MM-dd'))})
 
Any guidance would be greatly appreciated!
 
Thanks, Chris
Categories:
  • Suggested answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at
    Hi,
     
    Your advanced query would look like:
    @equals(
        formatDateTime(item()?['Promotion Start Date'], 'yyyy-MM-dd'), 
        formatDateTime(addDays(utcNow(), 1), 'yyyy-MM-dd')
    )
     
    Hope this helps!
  • Suggested answer
    KT-11121621-0 Profile Picture
    14 on at
    Hi,
     
    1. Your filter query should use the object that you select using the Dynamic content builder.  You select it from the list in the pop-up.
    2. The expression on the right-hand side should be: formatDateTime(utcNow()).  You'll need to use the Dynamic content builder to type the expression
     
    Here's what the advanced filter should look like:
     
    @greater([your_date_field], formatDateTime(utcNow()))
     
    ** what if the Promotion date is today? you can use greater than or equal as well.
     
     
    Good luck and let us know how it goes.
  • Cgangweg01 Profile Picture
    893 Super User 2026 Season 1 on at
    Hello @SpongYe
    Thank you so much! That worked but I did have to change it to @ greater than.
     
    I don't have this syntax down yet ... I want to make that advanced query a combined one with 'And' ...
     
    @equals(item()?['Price Type'],'STORE')
     
    Any suggestion for that?
     
    Thanks Again!
     
     
  • Verified answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at
     
    Then the code would look like:
    @And(
        greater(
            formatDateTime(item()?['Promotion Start Date'], 'yyyy-MM-dd'), 
            formatDateTime(addDays(utcNow(), 1), 'yyyy-MM-dd')
        ),
        equals(
            item()?['Price Type'],
            'STORE'
        )
    )
     
  • Cgangweg01 Profile Picture
    893 Super User 2026 Season 1 on at
    Thank you!

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 445

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 300

Last 30 days Overall leaderboard