Hi,

I want to get only year and get only month,
i want to get the only : 2005  and  05-27
How can i to do?

I know this : 

>>> Entry.objects.dates('pub_date', 'year')[datetime.date(2005, 1, 1)]>>> 
>>> Entry.objects.dates('pub_date', 'month')[datetime.date(2005, 2, 1), 
>>> datetime.date(2005, 3, 1)]>>> Entry.objects.dates('pub_date', 
>>> 'day')[datetime.date(2005, 2, 20), datetime.date(2005, 3, 20)]>>> 
>>> Entry.objects.dates('pub_date', 'day', order='DESC')[datetime.date(2005, 3, 
>>> 20), datetime.date(2005, 2, 20)]>>> 
>>> Entry.objects.filter(headline__contains='Lennon').dates('pub_date', 
>>> 'day')[datetime.date(2005, 3, 20)]


-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f6351f85-5dbf-47f3-a475-122fb52e6fa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to