Date and Time #6. Grand Final


#1



https://www.codecademy.com/courses/python-beginner-en-zFPOx/0/6?curriculum_id=4f89dab3d788890003000096#

Why does it say the code is incorrect? What am I doing incorrectly? I followed all the instructions. The error message says "Traceback (most recent call last):
File "python", line 4, in
ValueError: unsupported format character ':' (0x3a) at index 12"


from datetime import datetime
now = datetime.now()

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


#2

The modulo on the right is the one to remove.

Check the other three to the right of that. They are reversed.


#3

Thank you! I appreciate that.


#4

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