Replace this line with your code.
From datetime import datetime now = datetime.now() print '%s/%s/%s %s:%s:%s' % (now.month, now.date, now.year, now.hour, now.minute, now.second). this is my code but it showing error I need help
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.day,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
hope it works
print "date is %s/%s/%s and time is%s:%s:%s %(now.day,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.