
const oneDayAgo = new Date();
oneDayAgo.setDate(oneDayAgo.getDate() - 1);
const result=await database.listDocuments(databaseid, collectionId,[
Query.limit(50),
Query.orderDesc("$createdAt"),
Query.greaterThan("$createdAt",oneDayAgo),
Query.lessThan("$createdAt",today)
])

Please explain more what your issue is, what errors do you have? Is there anything else we need to know?

it says server error

So a 500 I'm guessing. Can you try without queries and see if that works?

yes its not working after Query.greaterThan("$createdAt",oneDayAgo)

what does oneDayAgo variable result in?

its return a date

try using .toISOString()
Recommended threads
- Stuck in "deleting"
my parent element have relationship that doesnt exist and its stuck in "deleting", i cant delete it gives me error: Collection with the requested ID could not b...
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
- Database Double Requesting Error.
I am getting error for creating new document in an collection with new ID.unique() then too getting error of existing document. When button is pressed one docum...
