Reputation: 29
Trying to add a filter to a gallery based on datepicker from a sql datasource. The date format is YYYY-mm-dd.
When I add a filter to the a SQL datasource gallery and I add a datepicker to allow me to filter the records on date. SQL displays the date as YYYY-MM-dd. Datepicker is showing date as MM\dd\YYYY. When I enter a date that I know I have data for, no data is display. I don't get an error in the formula.
Formula for Gallery.items:
Filter(
vw_Expenses,
Date = dp_ViewExpensesDateFilter.SelectedDate
)
Nothing is displayed. Is it because SQL displays dates as YYYY-MM-dd? If so, how do I fix this? If not, what is the recommended change to get the filter working on my gallery?
Upvotes: 0
Views: 2971
Reputation: 4405
Check the data type on the SQL column. It could be text or DATE
, etc.
The DatePicker control in PowerApps is of Date
type:
, 12:00:00 AM
appendedBy rapping it in the Text()
Function, you can change it to Text
:
You need to match up the DataSource (SQL) and the PowerApps data types to get the Filter function to work.
Upvotes: 1