Dont know how to fix it


#1

when i type this code:
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)

It says: Your printed date and time do not seem to be in the right format: mm/dd/yyyy hh:mm:ss

i don't know what to do can somebody tell me how fix it?


#2

@hbirru,

Have a close look at the =a-bit-expanded= Format-string

'%s / %s / %s / %s:%s:%s'


#3

I have the same problem, and I'm not getting any result either


#4

a date only needs two slashes