New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find operation on datetime field raises error --> argument of type 'datetime.datetime' is not iterable #199
Comments
Hi there - thanks for posting example code, I'll take a look at this and see what I can find. |
Some debugging notes to myself... Running Person.find(Person.birth_datetime == '2002-04-09 09:13').all() results in this RediSearch query:
I can also see that the
and that values for
This will work for exact matches, but probably should be more intuitive or at least documented and may vary depending on your locale settings: Person.find(Person.birth_datetime == '2002-04-09T09:13:00').all() Ideally too the way date/time is indexed could change so that it's possible to do range queries over it (probably need to store the date/time as a timestamp for this). |
@simonprickett - That's a nice finding, it stores as a date string based on the locale settings. Yes, as you called out for any date range queries it is good to go with the timestamp. |
Find operation on datetime field raises error --> argument of type 'datetime.datetime' is not iterable
The text was updated successfully, but these errors were encountered: