how do i filter a query by documents created in the last 2 hours?
Hi there everyone, i am querying a table for data and i want to only collect documents created in the last 2 hours. please how do go about it?
4 Replies
Compare
_creationTime
to current time:
oh duh you need to index
Some examples here: https://docs.convex.dev/database/indexes/#querying-documents-using-indexesYou can also do this using the built-in index:
Ah so there is a built-in for that, I was wondering
Thanks so much