Skip to main content
Community site session details

Community site session details

Session Id : BO4P5f8GZjvtDFUVlUjOSY
Power Apps - Building Power Apps
Unanswered

User datepicker for sql filter on gallery items

Like (0) ShareShare
ReportReport
Posted on 21 Jan 2019 16:06:59 by 60

Hi all, 

 

short question: 

i am alredy connected to our mssql server.

now i want to use a gallery to display my records.

i also placed a datepicker on the form.

Now i want to filter the results in the gallery depending on the datepicker.selectedvalue.

 

but i always get errors.

 

gallery1.items=Filter('[dbo].[Data]'; Text(datumSORTIERUNG; "[$-de-DE]yyyy-mm-dd hh:mm:ss") = '2017-01-10 17:00:00')

 

i also tried this:

gallery1.items=Filter('[dbo].[Data]';datumSORTIERUNG >= '2017-01-10 17:00:00')

 

and also tried this:

gallery1.items=Filter('[dbo].[Data]';datumSORTIERUNG >= DatePicker1.SelectedValue)

 

and tried many other things 😕

 

The mssql field "datumSORTIERUNG" is smalldatetime.

 

Can you help me please :-))

 

Thanks in advance 

jup

Categories:
  • Community Power Platform Member Profile Picture
    on 22 Jan 2019 at 13:06:01
    Re: User datepicker for sql filter on gallery items

    Hello jup! 🙂

     

    Try to use DateTimeValue in your Filter

    Filter('[dbo].[TestTable]'; datumDate = DateTimeValue("2019-01-22"))

     

    Maybe this will work for your scenario.

     

     

    Good luck and best regards

    Vasii

  • jup Profile Picture
    60 on 22 Jan 2019 at 11:42:21
    Re: User datepicker for sql filter on gallery items

    Hey! Thanks for this hint. 

    But I dont know what to do.

    I tried the solution explained but it doesnt work.

     

    Please help me in your words what i have to do.

     

    I just created a simple table

     

    and used this formula:

    Filter('[dbo].[TestTable]'; datumDate = '2019-01-22')

     

    also 

    Filter('[dbo].[TestTable]'; datumDate = DatePicker1.SelectedDate)

     

    Noting !!! Every time errors.

     

    Please please help me...

     

    I tried this also with smalldatetime AND date.   noting.

     

     

    Unbenannt.PNG

  • timl Profile Picture
    35,202 Super User 2025 Season 1 on 21 Jan 2019 at 17:15:24
    Re: User datepicker for sql filter on gallery items

    Hi @jup

    There is a bug in PowerApps where filtering by dates doesn't work. There are more details about this issue here...

    https://powerusers.microsoft.com/t5/General-Discussion/Trying-to-filter-or-lookup-on-a-date-field/td-p/134465

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Loading started