
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
- Messaging via Resend: "to": "\"undisclos...
I'm using the node-appwrite@18.0.0 SDK. ``` await messaging.createEmail({ messageId: ID.unique(), subject: "Subject", content: `htmlCont...
- Internal 500 Server Error
I don't have much information but I am unable to create anything on database, Auth users are creating but not able to fetch into database
- CORS + 401 Error with Appwrite Authentic...
I'm getting a CORS + 401 Error with Appwrite Authentication Access to fetch at 'https://cloud.appwrite.io/v1/account/sessions/email' from origin 'https://my-c...
