I am able to fetch the data using where condition if it's a text field but when I am trying to do the same with timestamp field and date things are not working.
Here is my code:
home.ts
firebase.firestore().collection("cities").where("timestamp", ">", "3/24/2020")
.onSnapshot(function(querySnapshot) {
var cities = [];
querySnapshot.forEach(function(doc) {
cities.push(doc.data().name);
});
console.log("Timestamp greather than 3/24/2020 -- ", cities.join(", "));
});
Everything works fine with firebase.firestore().collection("cities").where("state", "==", "CA") but not working with date.
Screenshot of fire storage:
Note: JLD doc should be returned in console because its timestamp value is greater than 3/24/2020
Edit 1
As guided by @alex now I am doing like this
let start = new Date('2020-03-25');
firebase.firestore().collection("cities").where("timestamp", ">", start)
but it is including the data of 2020-03-25 when I am using >, why ?
