Re: Filter by today

2012-06-12 Thread Andre Terra
You're missing result in your queries because your timestamp DateTimeField includes time information (otherwise it would be a DateField). Cheers, AT -- Sent from my phone, please excuse any typos. -- On Jun 12, 2012 7:55 AM, "Simon Pickles" wrote: > Hi, if my model has a timestamp field, > > c

RE: Filter by today

2012-06-12 Thread Sells, Fred
ssage- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of kenneth gonsalves Sent: Tuesday, June 12, 2012 7:11 AM To: django-users@googlegroups.com Subject: Re: Filter by today On Tue, 2012-06-12 at 07:46 +0100, Simon Pickles wrote: > result = Attempt.object

Re: Filter by today

2012-06-12 Thread kenneth gonsalves
On Tue, 2012-06-12 at 07:46 +0100, Simon Pickles wrote: > result = Attempt.objects.filter(timestamp = date.today()) should it not be datetime.datetime.today()? -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Filter by today

2012-06-12 Thread Simon Pickles
Hi, if my model has a timestamp field, class Attempt(models.Model): timestamp = models.DateTimeField('Timestamp') How would I query to get entries from today? I tried: result = Attempt.objects.filter(timestamp = date.today()) but it always says DoesNotExist (I can see entry in ta