How can I filter a date of a DateTimeField in Django?
Posted
by Xidobix
on Stack Overflow
See other posts from Stack Overflow
or by Xidobix
Published on 2009-08-23T03:52:07Z
Indexed on
2010/05/27
3:41 UTC
Read the original article
Hit count: 208
I am trying to filter a DateTimeField comparing with a date. I mean:
MyObject.objects.filter(datetime_attr=datetime.date(2009,8,22))
I get an empty queryset list as an answer because (I think) I am not considering time, but I want "any time".
Is there an easy way in Django for doing this?
* I have the time in the datetime setted, it is not 00:00.
© Stack Overflow or respective owner