Based on django documentation, your syntax is correct. Are you sure that
the field name is correct?

On Mon, 16 Oct 2023 at 19:13, Mansour Abdullahi Abdirahman <
mansuurtech...@gmail.com> wrote:

> We have a DatetimeField in our modal , when we want to filter the month (
> only the month ) we could do something like this:
>
> *MyModal.objects.filter(date_field__month=10)*
>
> But it did not work for so many as I remember, while I did some research
> still that problem stands and it's tiddling around.
>
> Anyone who got the solution.
>
> iIf you do, share for all of us.
>
> Thanks. *Regards*
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAET2c59RBbpiuWKkh2i38vk3z5vzPh69f5%3Db6XxpcMP%2Bteaa3g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAET2c59RBbpiuWKkh2i38vk3z5vzPh69f5%3Db6XxpcMP%2Bteaa3g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFKhtoRjRTO_cdej_hLWyyfghS89MZ_EFfF5do6q%2Bk%3DuaUMeKQ%40mail.gmail.com.

Reply via email to