What is wrong with this code?


It is suppose to return the time

from datetime import datetime
now = datetime.now()
print now
print '%s:%s:%s' % (now.hour, now.minute, now.seconds)


Look at the error it gives - AttributeError: 'datetime.datetime' object has no attribute 'seconds'. Should just be second


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.