Datetime(helppp)


#1

hello every body :smile:. could you tell me what my problem is?

from datetime import datetime
now = datetime.now()

print '%s-%s-%s' % (now.month, now.day, now.year)

error : Oops, try again. Your printed date doesn't seem to be in the proper format: mm/dd/yyyy.


#2

You must use: '%s/%s/%s' not '%s-%s-%s' to pass this exercise.


#3

Your format of date and time didn't work. have tried this print '%s/%s/%s' % (now.month, now.day, now.year)
print '%s:%s:%s' % (now.hour, now.minute, now.second) and it didn't work


#4

I don't get this at all I have tried those suggestions, but it still doesn't work.


#5

just type

now= datetime.now()

print now


#6

you guys really need to follow the instructions, if instructions say nothing a about putting in the date or say %s/%s/%s then don't do that


#7

print now.year
print now.month
print now.date


#8

Thank you very much, that helped I understood where I went wrong.


#9

It's probably how it's worded, that's probably why I didn't get it thank you vanguard714.


#10

I need help, where do I start?