Error when sorting dates in a Enum column type

Good day to all,

I have a form with a date field of ENUM type data comes from a slice. When using ORDERBY to sort the dates ascending, get an INVALID DATE on the form. If only a select is used it works but the dates are not in order. From another post @Aleksi suggested to use TEXT as the base type for the ENUM. When I changed it to text got a long date which then gave error when saving to the DATABASE.

What is need is a list of unique dates sorted in descending order, how can that be acomplished?

Attached screen shots.

This is my current formula:
3X_a_5_a5c4097c63f5de6d65acbdac9bd0efc640ede1df.png

0 4 329
4 REPLIES 4

@James_McFarlane
How about this:

SORT(
    SELECT(
        entrevistas a trabajar[Fetcha],
        TRUE,
        TRUE,
    ),
    TRUE // set it to FALSE if you want in descending order
)

Thanks @LeventK that did the trick. Wonder why sort did it and not order by, but it worked.

I did end up with a lone rangerโ€ฆ attached screen shot.
3X_1_3_13be14c1626cb7a7b2524c577ac21fe10cf28550.png

@James_McFarlane
ORDERBY only works if the SELECT expression is returning the key column values. If your list is not key column values, then you shall be using SORT instead. You can read here:


For the lone range, check and ensure that your column in your spreadsheet is also formatted explicitly as Date (not left as automatic) and also 6/24/2020 is purely a date, not a text value.

I know and my data resides in MySQL db column is set to date.

Thanks again.

Top Labels in this Space