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 Apps / filter gallery using s...
Power Apps
Answered

filter gallery using string date ranges

(0) ShareShare
ReportReport
Posted on by 407

Hi all,

 

I'm trying to filter a gallery from start date to end date (date pickers). I don't want to run into the delegation issue so i've created a 'strCreated' single line column to use instead. how can i filter the gallery using this field? This is what i have so far but nothing comes up: 

 

Filter(colItems, strCreatedDate >= dpStartDate.SelectedDate && strCreatedDate <= dpEndDate.SelectedDate)

 

Any clues what I could be missing? 

 

Thanks

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @_sourcecod3_ 

    What is the format of your text date you are storing?  It must be stored in the yyyymmdd format.

     

    Then your formula will be:

    Filter(colItems, 
     strCreatedDate >= Text(dpStartDate.SelectedDate, "yyyymmdd") && 
     strCreatedDate <= Text(dpEndDate.SelectedDate, "yyyymmdd")
    )

     

    I hope this is helpful for you.

  • _sourcecod3_ Profile Picture
    407 on at

    Hi @RandyHayes i tried your suggestion but it looks like it's looking for a number value. This is the error i get: 

     

    _sourcecod3__0-1607718182635.png

     

    When i change the Text to Value instead there are no errors but nothing it being pulled in the gallery.

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @_sourcecod3_ 

    Usually PowerApps will cast the value for you, but not always, so give this a try instead:

    Filter(colItems, 
     (Value(strCreatedDate) >= Value(Text(dpStartDate.SelectedDate, "yyyymmdd"))) && 
     (Value(strCreatedDate) <= Value(Text(dpEndDate.SelectedDate, "yyyymmdd")))
    )
  • _sourcecod3_ Profile Picture
    407 on at

    @RandyHayes This is perfect!! thank yo so much

     

  • VP2021 Profile Picture
    24 on at

    @RandyHayes 

    How would you apply the filter to both weekly date range and groupby items ?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard