I am trying to get documents of the last 24 hours from Firestore in my Android app. In my case, documents are post holders. Every post document has a field that holds Firestore Timestamp. Is there a way to compare timestamp to date in a query? I will use device date to compare to timestamp. What if the device date is not correct at the time?
My Firestore looks like:
--- posts (collection)
| |
| --- postid (documents)
| |
| --- country_code: "TR"
| |
| --- timestamp: Firestore.Timestamp
| |
| --- post_text: "Some Text"
| |
| --- username: "username"