Date and time


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

it keeps saying theres something wrong with my date time etc. but I checked it over many times and didn't see what was wrong

from datetime import datetime
now =

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


Hi, @inspired ,

Compare what you have with this format ...

mm/dd/yyyy hh:mm:ss

Your output should all be on a single line, and you need colons (:) rather than slashes (/) to separate the components of the time.


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