Date time grand finale


File "python", line 6
print (12/31/2001 15:29:29)
Syntax Error: invalid syntax
what should I do I did every thing they told me.

Date and Time | Grand Finale

Can you post your full code? So we can see what is causing the error


Here is my code
from datetime import datetimenow =
print ('%s / %s / %s %s : %s : %s') % (now.month,, now.year, now.hour, now.minute, now.second)

It says File "python", line 1
from datetime import datetimenow =
SyntaxError: invalid syntax
What is wrong with this?
Please help. Thank you


you can't import and declare a variable on the same line


in line 1 its should be only:
from datetime import datetime
line 2 follows with:
now =

Goodluck :wink:


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