What is wrong with this code?


#1



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)


#2

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


#4

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