I\'m querying firebase based on the dates. I find my query, but it doesn\'t look like firebase. The order of this is important to me. another picture link : firebase
You store the date/time in your database in a string value, in the format dd/MM/yyyy hh:mm:ss
. Strings in Firebase are lexicographically ordered, and unfortunately in the date format you use, the lexicographical order and the chronological order of the values are different.
The solution is to store the date/time value in a format that does allow it to be sorted in the way you want. The two most common ways are to store them as a timestamp (a numeric value that is the number of milliseconds since a specific date), or in a sortable string format (typically 2018-10-20T16:34:34
).
For more on this, see: