cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
laani
Frequent Visitor

Filter gallery by date

Hi All,

I have a gallery that connected to sharepoint list. One column from this list is a date time column. It is appears as a date field in the power app.  I want to filter my gallery by this date but face a problem. 
If there is something special between Filter function and dates ?
Filter (dataSource, 'Date Time Column' = Date(2020,3,18)) does not return any record to my gallery, but they are there. I took Date(2020,3,18) exactly to troubleshoot this case. In the same time I put a label on gallery template with this formula 
Text( ThisItem.'Date Time Column:' = Date(2020,3,18))  
and get true every where it was expected

thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Try

Filter (dataSource, Text('Date Time Column',"dd-mm-yy") = "18-03-20") 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

3 REPLIES 3
eka24
Super User
Super User

Showing a sample from the date Column in your table Will help. Meanwhile try

Filter (dataSource, 'Date Time Column' = "2020,3,18") 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

laani
Frequent Visitor

Hi @eka24  The next screenshot is a drill down into  column with a date, interesting that sharepoint list set to keep "Date only", but in app there is  "time" part too
Capture1.PNG

The next screen is drill to composed Date value, I think my problem that I do not see difference but Filter() function does.

Capture2.PNG

 

 

Try

Filter (dataSource, Text('Date Time Column',"dd-mm-yy") = "18-03-20") 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,536)