What am i doing wrong?


#1



Keeps saying my code looks a bit off and keeps pointing to the hour mark as a syntax error


from datetime import datetime
print datetime.now()
now = 2016-04-04 07:23:39.963157
print now


#2

you need to give your variable now datetime.now() and then print now variable
example of print:

print '%s/%s'(now.month, now.day)

it will print month/day


#3

from datetime import datetime
print datetime.now()
now_month = 04
now_day = 04
now_year = 2016
print '%s, %s, %s' %(now_month, now_day, now_year)


#4

from datetime import datetime will get the current date for you, you don't need to define what day, month or year is

just put datetime.now in some variable

and print it as I explained in earlier post