Answers for "datetime.datetime has no attribute time"

4

datetime has no attribute now

#You probably have

import datetime

#change that to

from datetime import datetime
Posted by: Guest on June-20-2020
0

AttributeError: type object 'datetime.datetime' has no attribute 'datetime'

>>> import datetime
>>> datetime
<module 'datetime' from '/usr/lib/python2.6/lib-dynload/datetime.so'>
>>> datetime.datetime(2001,5,1)
datetime.datetime(2001, 5, 1, 0, 0)
Posted by: Guest on October-15-2021

Code answers related to "datetime.datetime has no attribute time"

Python Answers by Framework

Browse Popular Code Answers by Language