Dear friends, I am unsuccessfully trying to arrange a list of dd-mm-yyy dates in ascending order. But I was not successful, any friends have a tip?
I’m using this formula
ORDER(data[“Cadastro IBCP”], item.dtvisita,‘desc’)
Dear friends, I am unsuccessfully trying to arrange a list of dd-mm-yyy dates in ascending order. But I was not successful, any friends have a tip?
I’m using this formula
ORDER(data[“Cadastro IBCP”], item.dtvisita,‘desc’)
Well, if you just think about your format:
DD-MM-YYY would not really be possible to sort in descending order as the DD can only be 0, 1 or 2 or 3, so it would order basically first all the dates that are in the first 10 days of all the 12 months, then it would do the same with the next 10 days etc.
However, what you can sort by desc is this format: “YYYY-MM-DD”, as it is always growing.
So if you can change your format to “YYYY-MM-DD” then you can do it, or if it is a TIMESTAMP
value, then you can also use that. Because Timestamp
is just a number that is always growing…
Hope this was helpful.