
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
- Having errors migrating to cloud
Project will not migrate compeltely
- 2 Columns still processing since yesterd...
Hey o/ Yesterday (around <t:1758045600:f>), I created a database and added several columns to it. After about 15 minutes, most of the "processing" tags disappe...
- 503 Timeout when Updating or Upserting D...
Hey I’m running into an issue when trying to update or upsert a row in Appwrite. The request hangs for a while and then throws this error: ``` AppwriteException...
