views:

103

answers:

2
t = e['updated_parsed']
dt = datetime.datetime(t[0],t[1],t[2],t[3],t[4],t[5],t[6]
print dt
>>>2010-01-28 08:39:49.000003

How do I turn that into a string?:

"January 28, 2010"
+4  A: 

The datetime class has a method strftime. strftime() Behavior in the Python docs documents the different formats it accepts.

For this specific example, it would look something like:

my_datetime.strftime("%B %d, %Y")
Cristian