When I input the simple code:
import datetime
datetime.utcnow()
, I was given error message:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
datetime.utcnow()
AttributeError: 'module' object has no attribute 'utcnow'
But python's document of utcnow
is just here: https://docs.python.org/library/datetime.html#datetime.datetime.utcnow. Why does utcnow
not work in my computer? Thank you!