Date mm/dd/yy hh:mm:ss


#1

I get the print but it said that the format is wrong?
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)


#2

@systemsurfer26678: I'd suggest you to check the instructions again and print the exact same thing is being shown there.
But if even after doing this, it doesn't work, refresh the page and try to execute again.


#3

Delete the brackets, or put them outside:
print ('%s/%s/%s %s:%s:%s') %(now.month, now.day, now.year, now.hour, now.minute, now.second)
or
print '%s/%s/%s %s:%s:%s' %(now.month, now.day, now.year, now.hour, now.minute, now.second)
This should work :smiley:


#4

The second one worked for me, thanks!


#8