Stuck on this date and time example (I am quite new to all of this so I know this is quite trivial)


It tells me that I need to look back at my code... overall I just do not understand how to use this function.

Replace this line with your code.


Please, copy and paste your well-formatted code ( use < / > ). The link provided doesn't allow me access your task. :slight_smile:


Getting the Current Date and Time
We can use a function called to retrieve the current date and time.

from datetime import datetime

The first line imports the datetime library so that we can use it.

The second line will print out the current date and time.

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

this is the instructions provided for me....

1 from datetime import datetime
3 now = 6
4 print

error message : Oops, try again. Did you store the result of in the now variable?


So, you're meant to assign to the now variable.

Then, print now.


incredible.... haha.

I appreciate the help, I am still really trying to get used to all of this new lingo!


It's fine.

I'm glad I could help. :slight_smile:

Keep coding!


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