
if(options?.from && options?.to) {
console.log(options?.from, options?.to);
query.push(
Query.greaterThanEqual("startDate", options.from),
Query.lessThanEqual("endDate", options.to)
);
}
i apply this query but the result it's always empty how can i apply a query on a date?

What is from and to? They should be iso formatted strings

const filterByDate = async function () {
console.log("Calendar Date", calendarDate[0].$d, calendarDate[1].$d);
outOfCityOrderListOptions.startDate = calendarDate[0].$d;
outOfCityOrderListOptions.startDate.setUTCHours(0, 0, 0, 0);
outOfCityOrderListOptions.endDate = calendarDate[1].$d;
outOfCityOrderListOptions.endDate.setUTCHours(23, 59, 59, 999);
const result = (await outOfCityOrderListStore.getAll({
from: outOfCityOrderListOptions.startDate.toISOString(),
to: outOfCityOrderListOptions.endDate.toISOString(),
}) as Store<OutofCityOrderListDto>);
console.log("Result",result);
if(result.data.length === 0 && result.total === 0){
await outOfCityOrderListStore.create({
startDate: outOfCityOrderListOptions.startDate,
endDate: outOfCityOrderListOptions.endDate,
outofCityOrderIds:[]
})
}
};
i converted them to ISOFormat but sometimes it doesn't work sadly

Uhh... Not sure what all that set UTC hours stuff is...assuming you have a date object, all you need to do is call date.toISOString()

thank you that worked for me like that. i thought i should calculate the utc time too for good measurements.
Recommended threads
- CSV Import not working
I am running 1.7.4, trying the sample book csv import. I get a pop up saying import started and then a quick follow up saying completed. Nothing ever appears ...
- Is my approach for deleting registered u...
A few weeks ago, I was advised not to use the registered users' id in my web app. Instead, I store the publicly viewable information such as username and email ...
- ❗[Help] Function stuck in "waiting" stat...
Hi Appwrite team 👋 I'm trying to contribute to Appwrite and followed the official setup instructions from the CONTRIBUTING.md guide to run the platform locall...
