Sorting Gallery by Date in Acending order

New Contributor

I have a gallery in my PowerApp that filters the results by "DateTimeChangeMade" from two date pickers. I also want to sort the results in Ascending order, but I can not seem to find the proper syntax for this. Below is my Filter that I need to wrap the sort command around, but once I add the SortByColumn around it, the items stop returning. What am I missing?

 

Filter('Request Production Change',DateTimeChangeMade>=DatePicker1.SelectedDate&&DateTimeChangeMade<=DatePicker2.SelectedDate) 

 

SortByColumns(Filter('Request Production Change',DateTimeChangeMade>=DatePicker1.SelectedDate&&DateTimeChangeMade<=DatePicker2.SelectedDate), "DateTimeChangeMade", If(SortDescending1, Descending, Descending))

1 Reply
Try using Sort instead of SortByColumn.