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. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/521e79df-244b-4c8c-bec4-6f48e0361211%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.