Friday, December 31, 2010

Extracting days,months,years from datefield.

I got a models.DateField and would like to extract months and years from that field so I can do calculations like a 'day in month' in a 'for month in months' loop in a 'for year in years' loop. How can I extract that info from a datefield? I have tried to read code written by others but their solutions are not very obvious to me.

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

No comments:

Post a Comment