Date and time programing problem


#1

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)

why it is showing wrong when i am trying to run it is showing error and even i tried every bit please suggest me if there is some mistake i have done


#2

a comma (,) between now.year and now.hour is missing


#3

thanx fir the help but i did it myself and it didnt required comma...bdw
thanku i will let you know if i face any problem...


#4

you need to separate the variable with a ,
wrong:

now.year now.hour

right:

now.year, now.hour

#5

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