cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

filter with datePicker

hi, I have a date and time column in a SharePoint list.
for example 10.10.2019 07:30
Now I would like to make a date filter with a date picker and ONLY filter the date (most would be>= ).
How can I do that without the time?
I've already tried Left (text); 10), but it dont works with the Datepicker, does anyone have an idea?
 
Kind regards
13 REPLIES 13
Highlighted
Super User III
Super User III

Re: filter with datePicker

@testaccPA 

This is the code I typically use to turn a date like 10.10.2019 07:30 into 10.10.2019 0:00.  My assumption is you are using a gallery.

 

Date(
    Year(ThisItem.your_column_name),
    Month(ThisItem.your_column_name),
    Day(ThisItem.your_column_name)
)

 

Then you could create a FILTER in the Items property of the gallery like this:

 

Filter(
    your_datasource_name,
    Date(
        Year(ThisItem.your_column_name),
        Month(ThisItem.your_column_name),
        Day(ThisItem.your_column_name)
    )
    >= DatePicker.SelectedDeate
)

 

---

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

 

 

Highlighted
Helper III
Helper III

Re: filter with datePicker

i use this in "Items" in the gallery:

Filter(Taskboard; Date(Year(Startdatum); Month(Startdatum); Day(Startdatum))

            >= DatePicker_TaskAnzeige_Search_Startdatum.SelectedDate

 

but dont work, what do you mean with thisItem ?

Highlighted
Super User III
Super User III

Re: filter with datePicker

@testaccPA 

When you use this code what error do you recieve?  Please note: your FILTER here will display any records having a date greater than or equal to the datepicker.

 

Filter(
    Taskboard;
    Date(Year(Startdatum); Month(Startdatum); Day(Startdatum))
        >= DatePicker_TaskAnzeige_Search_Startdatum.SelectedDate
)

 

Please ignore ThisItem.  I made an error.

Highlighted
Helper III
Helper III

Re: filter with datePicker

ay,

 

i has no error, its display


@mdevaney wrote:

@testaccPA 

When you use this code what error do you recieve?  Please note: your FILTER here will display any records having a date greater than or equal to the datepicker.

 

Filter(
    Taskboard;
    Date(Year(Startdatum); Month(Startdatum); Day(Startdatum))
        >= DatePicker_TaskAnzeige_Search_Startdatum.SelectedDate
)

 

Please ignore ThisItem.  I made an error.



display nothing

Highlighted
Super User III
Super User III

Re: filter with datePicker

@testaccPA 

What happens if you change this

 

>=

 

To this?

 

<=
Highlighted
Helper III
Helper III

Re: filter with datePicker

it workds, but why ? öÖ


 

Highlighted
Super User III
Super User III

Re: filter with datePicker

@testaccPA 

It works now because we are displaying any records having a date less than or equal to the datepicker.  The comparison operator was backwards Cat Wink

 

Is the problem now solved?

Highlighted
Helper III
Helper III

Re: filter with datePicker

ay, thanks for help 😄

Highlighted
Super User III
Super User III

Re: filter with datePicker

@testaccPA 

You are welcome.  Please Accept as Solution to close the thread.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,722)