Error in code


#1

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

Error Message:
3//2017 20:12:11
None

It should have printed mm/dd/year hour:minute:second

My code is 

 from datetime import datetime
now = datetime.now()

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

#2

Did you mean to write, now.day?


#3

Oh yes. Omg. What a blunder Thanks :slight_smile:


#4

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