I have a collection containing documents with an attribute startDate, which is ranging from the past into the future.
I try to query as follows:
database_id='',
collection_id='',
queries=[Query.greater_than_equal('startDate', datetime.datetime.now(datetime.timezone.utc).replace(microsecond=0).isoformat())]
)
for document in duties['documents']:
print(document['startDate'])```
The return is as expected for today being the 20th of Oct 2024:
```2024-10-28T02:45:00.000+00:00
2024-10-29T02:00:00.000+00:00
2024-10-30T02:00:00.000+00:00
2024-10-31T02:00:00.000+00:00
2024-11-01T02:00:00.000+00:00
But if I try the same with less_than_equal, I get unexpected behavior:
database_id='',
collection_id='',
queries=[Query.less_than_equal('startDate', datetime.datetime.now(datetime.timezone.utc).replace(microsecond=0).isoformat())]
)
for document in duties['documents']:
print(document['startDate'])```
returns:
```2024-09-17T11:30:00.000+00:00
2024-09-18T03:00:00.000+00:00
2024-09-18T14:05:00.000+00:00
2024-09-18T17:01:00.000+00:00
2024-09-19T09:05:00.000+00:00
2024-09-19T11:22:00.000+00:00```
... which isn't wrong. But its incomplete, as several documents with start date between the 20th of September and today are missing.
What am I doing wrong?
Thanks, cheers
Roland