title: Django Queryset - extracting only date from datetime field in query (inside .value() )
body: <p>I want to extract some particular columns from django query</p>
  
  <p>models.py</p>
  
  <pre><code>class table
    id = models.IntegerField(primaryKey= True)
    date = models.DatetimeField()
    address = models.CharField(max_length=50)
    city = models.CharField(max_length=20)
    cityid = models.IntegerField(20)
  </code></pre>
  
  <p>This is what I am currently using for my query</p>
  
  <pre><code>obj = table.objects.filter(date__range(start,end)).values('id','date','address','city','date').annotate(count= Count('cityid')).order_by('date','-count')
  </code></pre>
  
  <p>I am hoping to have a SQL query that is similar to this </p>
  
  <pre><code> select DATE(date), id,address,city, COUNT(cityid) as count from table where date between "start" and "end" group by DATE(date), address,id, city order by DATE(date) ASC,count DESC;
  </code></pre>