Grand finale error


It is giving me this error message, I don't see what is wrong with my code! Please help!
Traceback (most recent call last):
File "python", line 4, in
AttributeError: 'int' object has no attribute 'now'

I expected it to show the date and time

from datetime import datetime
now =

print ('%s/%s/%s %s:%s:%s') % (now.month, now.year, now.hour, now.minute, now.second)


After in your print statement is a period where there should be a comma.


You accidentally put a period instead of a comma after the day. Fix that, and you should be good.


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