
I am attempting to create a filter on a gallery. There is a PIckupDate calendar picker, Ther is a ReturnDate calendar picker, and a VehicleType dropdown. The PickupDate hits a Sharepoint List that has dates in it, and the Returndate hits the same list. VehicleType will hit another list that is in the same site. When I filter by type I can get the type of vehicle to show in the gallery by using Filter(MD2018_Vehicle_Info,Vehicle_x0020_Type = TypeDropdown.Selected.Value).
But when I try and filter the dates I get Invalid Argument Type. Expecting a number value. I think it has something to do with the way the date coulums are formated (I have them set as date time).
Does anyone know how to format dates so that PowerApps will see the date as a number value?
Hi @Anonymous,
How do you filter dates within the Gallery control of your PowerApps app? Could you please share a bit more about the formula?
Could you please show a bit more about the Date columns within your SP list? Are they Date only column?
Further, could you please show more details about the error message within your app?
I assume that the Date columns are Date Only type column in your SP list, is it true? I have made a test on my side and don't have the issue that you mentioned. Please take a try with the following workaround:
Set the Items property of the Gallery control to the following formula:
Filter('20180615_case4',PickUpDate=Text(DatePicker1.SelectedDate,"[$-en-US]mm/dd/yyyy"))
Note: The '20180615_case4' is the SP list data source within my PowerApps app. The PickUpDate is a Date only type column in my SP list. The DatePicker1 represents the Date Picker control within my app.
Best regards,
Kris