Something wrong with the format of my datetime


#1


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

it shows that my format of the print date is wrong. Why?


Replace this line with your code.


#2

Hello,

Please, post well formatted < / > code tried. This link will not redirect to yours.

Thank you! :slight_smile:


#3

try this
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)


#4

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