cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jinwei
Frequent Visitor

Unable to sort date

Hi all,

I have a gallery which I want to sort by dates.

SortByColumns(Filter('Sharepoint List',StartsWith(Title)), "ReviewDate", If(Dropdown_Sort.Selected.Value = "Review Date (Ascending)", Ascending, Descending)

Right now as I have saved the date as text in Sharepoint, it is sorting as such
01/Nov/21
02/Dec/20
03/Mar/21

Instead I want this
02/Dec/20
03/Mar/21
01/Nov/21

How would I do that?

Best

1 REPLY 1
Pstork1
Dual Super User III
Dual Super User III

The problem is that you are saving the column as text, so its sorting alphabetically, not by date.  You can either change the text to be in the format of yyyy-mm-dd which will sort alphabetically correctly or you can save the date as a date column and sort on that.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,278)