Arrays with Dates

Hi,
I' programming an app, where I want to see "Transactions".
They are saved in Firestore and have a Date, an User and money. I want a list, where the users are sorted in sections by the date. Like:

21/3/2020

User1 11:08 AM

User3 11:07 AM

User2 10:08 AM


Is it possible to do that?
Hi,
If your Array contains actual Dates and not date strings you can use this:
Code Block swift
var sorted = array.sort({$0.compare($1) == .OrderedDescending})

Take care,
David
Arrays with Dates
 
 
Q