Answers for "how to sort documents in firebase database date wise"

0

how to sort documents in firebase database date wise

// Create Data
const timestamp = firebase.firestore.FieldValue.serverTimestamp;

db.collection('things').add({ ...myData, createdAt: timestamp() })


// Query
db.collection('things').orderBy('createdAt').startAfter(today)
Posted by: Guest on June-05-2021

Code answers related to "how to sort documents in firebase database date wise"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language