I am using Python 3.7 and trying to learn datetime
module from library, but I am getting AttributeError
. code below:
import datetime
t = datetime.time(4, 20, 1)
# Let's show the different components
print(t)
print('hour :', t.hour)
print('minute:', t.minute)
print('second:', t.second)
print('microsecond:', t.microsecond)
print('tzinfo:', t.tzinfo)
As run file I get this error AttributeError: module 'datetime' has no attribute 'time'
Please Help me to find where I am going wrong. Thanks