Possible Duplicate:
Parse date and format it using python?
i have a date string like 2011-07-15 13:00:00+00:00 . Any way to convert this string to a datetime object in python ?
Thank You
You can handle the time zone appropriately, and have the format recognized automatically, if you use dateutil.parser, as described here:
from dateutil import parser
dt = parser.parse("2011-07-15 13:00:00+00:00")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With