AttributeError: module datetime has no attribute now

87

AttributeError: module 'datetime' has no attribute 'now' -

import datetime

print(type(datetime))
d1 = datetime.datetime.now()
print(d1)

attributeerror module 'datetime' has no attribute 'now' python -

import _datetime

today = _datetime.date.today()

print(today)

'datetime' has no attribute 'now' -

import datetime
print(datetime.__file__)

Comments

Submit
0 Comments