Getting an error that doesn't make sense? What am I overlooking?


#1



(The Date and Time lesson)


The error is as follows:
Oops, try again. Your printed date and time do not seem to be in the right format: mm/dd/yyyy hh:mm:ss

However, the format looks fine to me... not sure what I'm really doing wrong here.


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

which suggests they all need to be combined in one statement.


#3

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