Error "Your printed date and time do not seem to be in the right format: mm/dd/yyyy hh:mm:ss" Even after following all relevant Instructions. Please enlighten


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<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/grand-finale

<In what way does your code behave incorrectly? Include ALL error messages.>
Output obtained: 11/18/2017
17:28:34

<What do you expect to happen instead?>
11/18/2017
17:28:34

from datetime import datetime
now = datetime.now()

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

#2

Print the date and time together in the form:

mm/dd/yyyy hh:mm:ss 

your form:

mm/dd/yyyy 
hh:mm:ss 

#3

Thanks bud. You’ve been a pro.


#4

‘’'python

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)
’’’


#5

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