From datetime import datetime now = print '%s/%s/%s %s:%s:%s' % (now.month,, now.year, now.hour, now.minute, now.second). this is my code but it showing error I need help


Replace this line with your code.


And what exactly is your question?


hello ,exactly i got the wrong one. All you can do is to code in a different way.follow this,,,

date = '%s/%s/%s' %(now.month,,now.year)
time = '%s:%s:%s' %(now.hour,now.minute,now.second)
print(date+ " "+time)


i was getting the same issue but finally managed it...
your code is almost right... just put a space between 3rd and 4th %s
try this...
hope it works


try using
print "date is %s/%s/%s and time is%s:%s:%s %(,now.month,now.year,now.hour,now.minute,now.second)


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