import datetime as d
time = d.datetime.now()
time = time.strftime("%Y-%m-%d %H:%M:%S")
#year-#month-#date #hour:#minure:#second
print(time)
#date and time in a mm/dd/yyyy hh:mm:ss format
from datetime import datetime
now = datetime.now()
print('%02d/%02d/%04d %02d:%02d:%02d' % (now.month, now.day, now.year, now.hour, now.minute, now.second))