Getting the Current Date and Time


from datetime import datetime
now=2017-06-29 15:34:05.618208


File "python", line 2
now=2017-06-29 15:34:05.618208
SyntaxError: invalid syntax

Replace this line with your code.


1.) Create a variable called now and store 
the result of in it.
2.) Then, print the value of now.

So as you can see from the instructions, and as you have done, you have created a variable now. Except, you are supposed to equal now to not the time but the result of Yes, the result of will be an exact time. However, your not equaling now to that directly, you are going to equal now to (as in the instructions). This way when you print the value of now (as in the second step of the instructions) when you print now, will be run through now to give you the time.


Thanks, mate! Its appreciated.


No problem man! Glad to have helped! :thumbsup:


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