Python, date & time, Hot date


#1

excuse me, i'am new here and still learn.I don't know why this not work.
from datetime import datetime
now = datetime.now()

print '%s-%s-%s' % (now.month, now day, now.year)
try to follow a simple instruction but it does work.Thank you :slight_smile:


#2

You're code is not printing the day. Take a look at your date-types in the quote. One of them is missing something.


#3

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