Convert and convert back datetime in Django
Posted
by
Anshuma
on Stack Overflow
See other posts from Stack Overflow
or by Anshuma
Published on 2012-03-20T11:25:37Z
Indexed on
2012/04/12
5:29 UTC
Read the original article
Hit count: 675
I am parsing feeds using feedparser and I am trying to store updated or updated_parsed attributes of feeds in Django db.
But it shows an error as [u'Enter a valid date/time in YYYY-MM-DD HH:MM[:ss[.uuuuuu]] format.']
Please tell me how to convert updated and updated_parsed such that it can be stored in the Django db such that I can (convert and reuse) or just reuse the date stored in db while parsing in this way:
feedparser.parse("url", modified = lastupdate)
© Stack Overflow or respective owner