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 / Datepicker Filtering f...
Power Apps
Answered

Datepicker Filtering for gallery issue

(0) ShareShare
ReportReport
Posted on by 6
I'm trying to create a datepicker for a Gallery. Since my data source is an excel, it reads the dates as text even though it has been formatted as a date in the excel. 
 
Currently, my date picker Onselect is:  Filter(Permit_V2,'Permit Status'="Approved", IsBlank(DatePicker1.SelectedDate) , DateValue(Dateofworktobedone, "en-GB")=DatePicker1.SelectedDate)
 
Gallery: 
Filter(Permit_V2, 'Permit Status' = "Approved", IsBlank(VarFilter) || 'Location of work' = VarFilter || IsBlank(DatePicker1.SelectedDate) || DateValue(Dateofworktobedone, "en-GB") = DatePicker1.SelectedDate)
 
Text for the Dateofworktobedone field: 
DateValue(Text(ThisItem.Dateofworktobedone, "dd/mm/yyyy"), "en-GB")
 
The problems are that the dates are still formatted in US format, and the other main issue is that it does not filter at all? Are there any troubleshooting solutions for this issue? 
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,431 Super User 2026 Season 1 on at
     
    Gallery (Items)
    Filter(
        Permit_V2,
        'Permit Status' = "Approved",
        IsBlank(VarFilter) || 'Location of work' = VarFilter,
        IsBlank(DatePicker1.SelectedDate) || DateValue(Dateofworktobedone, "en-US") = DatePicker1.SelectedDate
    )
     
    Label showing the work date
     
    Text(
        DateValue(ThisItem.Dateofworktobedone, "en-US"),
        "[$-en-GB]dd/mm/yyyy"
    )
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • Verified answer
    WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    I will add something here making a few assumptions. Firstly, assuming you are using SharePoint and Dateofworktobedone is an actual Date field, you do not need any conversion - dates are actually stored in UTC format and converted by the Regional Settings of either the browser (Power Apps) or the SharePoint site (if viewed in SP). I am not sure why you have a FIlter OnSelect of the Date Picker (it needs to be an action of some sort, not a data set), but the Items of the Gallery would simply be 
    Filter(
       Permit_V2, 
       'Permit Status' = "Approved", 
       IsBlank(VarFilter) || 'Location of work' = VarFilter,
       IsBlank(DatePicker1.SelectedDate) || Dateofworktobedone = DatePicker1.SelectedDate
    )
    Assuming alternatively that Dateofworktobedone is stored as Text in your Data Source (the type does not matter), then you have a Delegation issue (@MS.Ragavendar's code will work fine excluding this matter) but do not need to convert the field value to compare it (DateValue will actually work better on it in US format)- but you can set the Date Picker Format as
    "dd/mm/yyyy"
    and it will display as you need it to. The Gallery Filter would be (to manage the Delegation issue)
    With(
       {
          _Data:
          Filter(
             Permit_V2, 
             'Permit Status' = "Approved", 
             IsBlank(VarFilter) || 'Location of work' = VarFilter
          )
       },
       Filter(
          _Data,
          IsBlank(DatePicker1.SelectedDate) || DateValue(Dateofworktobedone) = DatePicker1.SelectedDate
       )
    )
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard