I have a django model with a DateTimeField called when which I want to match against a Date object. Is there a way to do that in django’s queryset language better than
Samples.objects.filter( when__gte = mydate, when__lt = mydate + datetime.timedelta(1) )
Same like W_P, off the top of my head:
You can round that up to year, month, day. This is the way I create posts archive in my code. I have three options: yearly archive, monthly archive and daily archive. The difference between them is the combination of arguments.