0
I would like to sort the data returned from Firebase by Due Date, at the moment I am doing as follows:
this.Collection = document.collection('values', ref => ref.orderBy('data_vencimento'));
But how can it be seen in the image below, is not ordering correctly, there are other ways to sort by date? I can do a Sort() on the Observable returned from Firebase?
Actually it is ordering correctly, but it will not have the desired result because it is ordering like a string not like a date in the BR format, if you change to the format for
yyyy-mm-dd
, will have the desired result– Costamilam
Okay, I’ll check it out...
– Luiz Ricardo Cardoso
On the bench needs to be saved in YYY-MM-DD format for orderby to work properly, thank you!
– Luiz Ricardo Cardoso