Rank 1: Thread
I need to query a collection by using a date query but i'm not able to find a solution.
I posted on stack the question https://stackoverflow.com/questions/77665907/appwrite-unable-to-query-by-date-with-dart/77667807#77667807 but i hope to find a solution here.
Basically i'm query the db like that:
final response = await _db.listDocuments( databaseId: AppwriteConstants.database_id, collectionId: AppwriteConstants.collection_id_events, queries: [ Query.equal('fk_user', fk_user), Query.equal('date', date.toIso8601String()), ], );
and the documents are created like that:
final response = _db.createDocument( databaseId: AppwriteConstants.database_id, collectionId: AppwriteConstants.collection_id_events, documentId: .., data: { ... 'date': date.toIso8601String(), 'startTime': startTime.toIso8601String(), 'endTime': endTime.toIso8601String(), ... }, );
In the collection the date are added with the time setted to 0, like 2023-12-15T00:00:00.000 but once i recover the documents without the date query i obtain the date in this format 2023-12-15T00:00:00.000+00:00. If i use the query like in the example nothing is returned.
I tried to insert in appwrite the date like date.toUct().toIso8601String() but nothing changed. Some help?