My model is
class SMS(models.Model):
subscriberId = models.ForeignKey(Subscriber, null=False)
epochTime = models.IntegerField(null = False)
time = models.CharField(max_length= 250 ,blank = False)
date = models.CharField(max_length= 50 ,blank = False)
Now, the issue is I am saving date as a character 1-11-2015
and using date__range
filter like this:
SMS.objects.filter(date__range =["1-11-2015","12-11-2015"]).count()
But it is giving me wrong results.
So, how to use this date__range
filter efficiently?