On Nov 22, 11:28 pm, Rogério Carrasqueira
<rogerio.carrasque...@gmail.com> wrote:
> Hi Jagdeep,
>
> Consider to use a query like this example:
>
> sales =
> Sale.objects.extra(select={'month':'month(date_created)','year':'year(date_created)'}).values('year','month').annotate(month=11,year=2010)
>
> It works on mysql.
>
> More informationhttp://docs.djangoproject.com/en/dev/ref/models/querysets/

Thanks for this link problem solve,
using this simple query
client =
ClientJob.objects.filter(date__year=2010).filter(date__month=11)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to