I am tring to query to a Firestore database to a collection and filter by date. I have a Timestamp field and i need to get the results when a field called "specificDate" is equal to now().
app.get('/execute', async(req, res, next) => {
const snaps = await db.collection('notifications').where("specificDate", "==", new Date()).get()
const results= [];
snaps.forEach(snap => results.push(snap.data()));
res.status(200).json({results});
});
No matter any combination ,i have no result.If i change "==" with "<" or ">" i have results.
I am afraid the problem it s something related with the time,and i want to ignore that,i only care Year,Month and Day.
The following images illustrates my firestore collection,with just one 1 item.
I been researching and i am not lucky yet.