Grand finale . i need help

guys i need help im stuck on the Grande Finale lesson
here’s the code im using

from datetime import datetime
now = datetime.now()

print ‘%s/%s/%s’ % (now.month, now.day, now.year)
print ‘%s:%s:%s’ % (now.hour, now.minute, now.second)

but it says. Your printed date and time do not seem to be in the right format: mm/dd/yyyy hh:mm:ss
where is the problem ???

Hi you should print it like that

mm/dd/yyyy hh:mm:ss

your are printting it like that

mm/dd/yyyy 
hh:mm:ss

2 posts were split to a new topic: I keep getting a syntax error

2 posts were split to a new topic: I tries many other codes but doesn’t work for any of them

try this
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)

1 Like