Hello,
I am new in django. I would like to display the list of all record of particular month and year.Please find below model structure of my table.
class Order_Detail(models.Model):
Order_Date_Time=models.DateTimeField(default=datetime.datetime.now(),blank=True,null=True)
and
for example i would like to query record of month: january and year : 2016
Query am trying is:
month_wise=Order_Detail.objects.filter(Order_Date_Time__year=2016,Order_Date_Time__month=1)
am getting empty list.