I Have a value of
datetime.datetime(2015, 1, 28, 13, 53, 36)
and I want it to be printed as string as
Wednesday, January 28, 2015 13:53:36
I tried to
import datetime
x = datetime.datetime(2015, 1, 28, 13, 53, 36)
z = strptime(str(x), '%A, %B %d, %Y %H:%M:%S')
but got:
Traceback (most recent call last):
File "<pyshell#40>", line 1, in <module>
z = strptime(str(x), '%A, %B %d, %Y %H:%M:%S')
NameError: name 'strptime' is not defined
does anyone have an idea about this?