# 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))
Sample.objects.filter(date__year='2011',
date__month='01')