const minDate = new Date();
minDate.setFullYear(minDate.getFullYear() - filterData?.maxAge);
const maxDate = new Date();
maxDate.setFullYear(maxDate.getFullYear() - filterData?.minAge);
Query.between("birthdate", minDate.toDateString(), maxDate.toDateString())
// Query.between("birthdate", minDate, maxDate)
AppwriteException: Invalid query: Query type does not match expected: datetime
Query.between
only accept number
or string
Query.between: (attribute: string, start: string | number, end: string | number) => string
How can i handle with this kind of situations if i want to get docs between 2 dates? Any idea?
Known issue: https://github.com/appwrite/appwrite/issues/5650
This issue for only the type of float
I also commented on related issue with the datetime
.Thanks
[CLOSED] Any solutions for Query.between() with datetime
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here 🙂 I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...