How do i convert this string to
datetime object
Fri, 21 Apr 2006 03:02:17 +0000


Previously I'd been using mxDateTime (which does everything but requires a C extension) to parse e-mail style dates (i.e. the ones used in RSS and changes.xml) but it looks like they're handled by the standard library.

http://blogs.law.harvard.edu/tech/rss

mx.DateTime.DateTimeFrom(d['entries'][1].updated)
Traceback (most recent call last):
  File "<input>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/mx/DateTime/DateTime.py", line 226, in DateTimeFrom
    value = float(arg)
ValueError: invalid literal for float(): Fri, 21 Apr 2006 03:02:17 +0000

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to