Sort Inline List by date - Fail

I’m trying to sort my inline list by a start date in descending order. Newest date first.
Glide is sorting like this:

  1. January 3, 2022
  2. January 24, 2022

I’m assuming because there is no zero before the three, in the first date, that is why it is sorting this way? If the months are different, it sorts properly, so I know glide is somewhat recognizing this column as a date.

Does anyone know a workaround or a fix?

Is this a true date column, or just text? It should be sorting correctly by date if the date column is set up correctly. Do you have a screenshot of this particular column in the data editor?

Its an if then else column, based on all date columns

The IF column may be the issue. It might be recognizing it as text once it passed through the IF column. Just for clarification…does the IF column always return a date, or do you ever return a blank some other text value under certain conditions? Usually when you mix different data types in an IF column, then it treats the whole thing as text.

How many date columns is this IF column referring to?

Hmmm, this is weird. I’m testing it out my self, and I’m struggling to see the pattern or a problem, but I don’t have your exact same setup. I suspect that you are correct with the lack of a zero, but dates usually sort correctly no matter what. Are some of your user specific dates empty?

It seems that it’s sorting alphabetically somewhat based on the displayed format, or it’s sorting based on the underlying date format, but it’s hard to say without seeing all of the user specific column values and how the entire list looks once it’s sorted. Can you show how the entire list looks? I’m trying to find a pattern, but I’m not seeing it yet.

Also, can you do a favor for me and convert your date columns to text columns briefly. I just want to see the true underlying value to see if it’s in ISO format or not. First I would suspect that if it’s using the underlying ISO format to sort, then it should work no matter what because ISO is in standard YYYYMMDD format. If the dates were hand entered by you, then they may not be in ISO format, or it’s a mix of YYYYMMDD and MM/DD/YYYY formats underneath.

Would you be willing to make your app copyable and share the link so I can make a copy and take a look at the entire setup, or at least duplicate it and strip it down to just this date issue so I can take a look? I have an idea for a workaround, but I want to see if there is actually a problem with using an IF column of dates to sort, or if it’s something with your particular setup.

3 Likes