
I'm having some trouble querying the $updatedAt attribute. I'm using Query.greaterThan("\$updatedAt", lastSyncDate)
to generate the query string greaterThan("$updatedAt", [2023-03-11 23:22:16.190051])
where the coding language is dart and lastSyncDate is a DateTime object. Yet the returned results have an $updatedAt
of before that date on 2023-02-18. I've tried making sure there is a proper index for this and the mentioned query is the only query being used.

The database and collection ids are correct. This is a real head scratcher.

Here in the US we have a weird thing called day light savings where the clocks get set forward an hour tonight at 2am, but neither the server nor where the client is at should be affected by that right now. And even if it was, it shouldn't affect it by thinking a 3 week old date is in the future.

Can you try to convert the datetime a bit more? Like:
lastSyncDate.toUtc().toIso8601String()

Works. Thanks!

[SOLVED] Problems Querying $updatedAt
Recommended threads
- Document Permissions ... User array vs T...
In my app, I will have multiple users who need read accesss a document, but ONLY them. Sometimes its 2 people and sometimes it will be 100 but sometimes 5000. ...
- Permissions - Design Patterns
Hey Appwriters. I'm keen to tap into your database expertise. In my app I have nested collections: Canvas (think of it like Trello) Cards (just like Trello ca...
- Reset/Recalculate Dashboard Values
Is there a way to reset/recalc this value on the dash? I had issues importing, and after my second import this was how it ended, I've since added some documents...
