Quantcast
Channel: Convert string from feedparser to datetime - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Beat Bolli for Convert string from feedparser to datetime

You should use the parsed forms of the date fields: feed.updated_parsed contains a struct_time like the one returned by time.gmtime().

View Article



Convert string from feedparser to datetime

I'd like to convert the string obtained as follows into datetime:d = feedparser.parse(xmlUrl)t = datetime.strptime(d.feed.updated, "%Y-%m-%dT%H:%M:%SZ")note the T and Z letters in the mask. They can be...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images