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
eka24
Super User III
Super User III

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 III
Super User III

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

 

 

eka24
Super User III
Super User III

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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