[Solved] How to get documents using the between query on a datetime value in flutter/appwrite
- 0
- General
I am trying to select some documents btw some certain date range in Flutter using the appwrite adk for Flutter but when I pass the date value in string format using the query command I keep getting this error that says, >>> invalid query: Query type does not match expected: datetime <<<
Pls I need help in this, on how to fix it.
There might be a bug with the between query. I suggest using greater than and less than. Also, to format the datetime you can call datetime.toUtc().toIso8601String() or something like that
Okay, I will try that and get back to you. Thanks
Okay, thanks it worked, can believe this gave me issues, but using the less than and greater then query helps alot, seems like the between query have a bug in it 🤷.
Incase some one face the issue in the future, you might have to make some tweek on the datetime format cus you will be using .toUtc cus of the server time zone and that might not match well with your local time zone.
I simply just added one day to the days and use less than instead of less then and equal query.
Thanks 💯
[Solved] How to get documents using the between query on a datetime value in flutter/appwrite
Recommended threads
- Rec'd a "phishing" email that apparently...
I received an email attempting to convince me that my password expired - and the link wanted to send me to an appwrite instance: (https://updating-projects-ads....
- HackByte X AppWrite
I am Om an Organiser at Hackbyte, Central India's largest hackathon. We are an MLH acreddited hackathon and this is our 4th iteration. Last year we had around ...
- Whats best practise for Appwrite Cloud?
Appwrite Teams map very nicely to my needs, it is how i group users together. ... I use roles to define permissions. Should I also map a table to each team ? ...