Django get months from models.DateTimeField
<p>Is it possible to filter a models.DateTimeField but only get the month in the filter object?</p>

<p>The field is:</p>

<pre><code>time_stamp = models.DateTimeField(
            default=timezone.now)
</code></pre>

<p>When I filter it, this is what I get:</p>

<blockquote>
  <p>[datetime.datetime(2016, 9, 22, 15, 2, 48, 867473, tzinfo=),
  datetime.datetime(2016, 9, 22, 15, 4, 22, 618675, tzinfo=),
  datetime.datetime(2016, 9, 22, 15, 5, 20, 939593, tzinfo=)]</p>
</blockquote>

<p>The filter returns 3 rows, but clearly there is too much information. I only require the months, and maybe the year.</p>

<p>How can I achieve this?</p>

<p>Any help or direction would be appreciated,</p>

<p>Thanks</p>