Re: Date and Time (Pretty)


Hi, I'm able to get an output with the code below.

The output to my code is:
9/22/2016 16:26:7

But, I'm getting the error message :

Oops, try again.
It looks like your printed time is not in the proper format: hh:mm:ss

from datetime import datetime
now =

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

Requesting advice.




Only time.
You have too many %s. It only wants the now.hour, now.minute,now.second.


OMG, that did it. I was over thinking it. Thank you.


That is good news.

Remember -

All the best further & as you said, do not over think it.


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