Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
const date_time = "2024-11"; const batchs = await databases.listDocuments( process.env.APPWRITE_DATABASE_ID, process.env.APPWRITE_COLLECTION_ID, [ ? ] );
[SOLVED]
const startOfMonth = "${date_time}-01T00:00:00.000Z";
const endOfMonth = new Date("${date_time}-01T00:00:00.000Z");
endOfMonth.setMonth(endOfMonth.getMonth() + 1);
endOfMonth.setDate(0);
const endOfMonthISO = endOfMonth.toISOString();
query.push(sdk.Query.between('$createdAt', startOfMonth, endOfMonthISO));
Recommended threads
- Invalid type for attribute 'email': emai...
I'm using the node-appwrite SDK to create a table, the column payload looks like this: ```json [{"key":"email","type":"email","required":true, "size": 512}] ``...
- Project restoration button in console
The project restore button in console is taking no effect, i have tried several times and still nothing, it gives same popup if i reload
- Auth not working
guys my appwrite auth isnt working? oauth works (Sign in with google n discord) i have 2 websites deployed where do i get help when i do sign in with email and ...