I want to show specific month with year data according to $ceatedAt property , i am unable to do it , how will i do this ?
TL;DR
User is having trouble with an Appwrite query involving the $createdAt property. They posted their code which included a limit, order, greater than, and not equal operators. They are specifically asking how to filter data based on a specific month and year using the $createdAt property.
Another user suggests converting the date to an ISO 8601 string in UTC before executing the code.
The original user responds that their code now works after making the suggested changes.
Solution: The user needed to format the date as an ISO 8601 string in UTC before executing the query.TypeScript
databaseID,
collectionId,
[
Query.limit(50),
Query.orderDesc("$createdAt"),
Query.greaterThan("$createdAt",date).
Query.notEqual("status","failed"),
]
);```
this code i have written , but its not working at all
Did you format date as an iso 8601 string in UTC?
After converting , my code works , thanks
[SOLVED] Appwrite Query Help with $createdAt property
Recommended threads
- Site deployment keeps getting failed
Hi good folks, need a hand with Sites deploy Error on every deploy: Synchronous function execution timed out... duration doesn't exceed 30 seconds [exact log ...
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...
- trying to figure out how to activate my...
please help