Your printed date doesn't seem to be in the proper format: mm/dd/yyyy


#1

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-python/lessons/date-and-time/exercises/hot-date?action=lesson_resume&link_content_target=interstitial_undefined

<In what way does your code behave incorrectly? Include ALL error messages.>
Your printed date doesn’t seem to be in the proper format: mm/dd/yyyy.

<What do you expect to happen instead?>
It should work! The format should be mm/dd/yyyy, which is being displayed correctly when I hit run, but I can continue



from datetime import datetime
now = datetime.now()

print '%s\%s\%s' % (now.month, now.day, now.year)



#2

facepalm. I was using backslash…


#3

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