On Dec 23, 2007 11:06 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Using modified_parsed gave me this date (2007, 12, 21, 21, 22, 49, 4, > 355, 0) but threw an error when applying a filter: AttributeError > at / 'time.struct_time' object has no attribute 'year' > > I think I am just not familiar enough with Django's handling of > datetime to see what I am missing here.
This isn't a Django thing, it's a Python thing. Unless and until you have something of type 'datetime.date' or 'datetime.datetime', you're not going to be able to treat it like you do. The feed parser is giving you a nine-element time tuple because that's a nice baseline for a Python object representation -- you can feed it into all sorts of other standard things to get other types of objects or do other sorts of calculations. So go have a look at that tuple, and at the docs for Python's standard 'datetime' and 'time' modules, and you should get a feel for what you can do with it. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---