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
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...
- general_route_not_found - Auth Guide
If you’ve just added a subdomain to your project, verified your DNS records, and confirmed your SSL certificate is working, but you're still hitting a `general_...