xxxxxxxxxx
from django.utils import timezone
date_today = timezone.localtime(timezone.now()).date()
qs = queryset.filter(created_at__date = date_today)
xxxxxxxxxx
# gt - Greater than.
# gte - Greater than or equal to.
# lt - Less than.
# lte - Less than or equal to.
import datetime
samples = Sample.objects.filter(sampledate__gte=datetime.date(2011, 1, 1),
sampledate__lte=datetime.date(2011, 1, 31))