1import datetime
2now = datetime.datetime.now()
3print now.year, now.month, now.day, now.hour, now.minute, now.second
4# 2015 5 6 8 53 40
1########################################################################
2import datetime
3now = datetime.datetime.now()
4print(now.year, now.month, now.day, now.hour, now.minute, now.second)
5########################################################################
6from datetime import *
7now = datetime.now()
8print(now.year, now.month, now.day, now.hour, now.minute, now.second)
9########################################################################
1import datetime
2now = datetime.datetime.now()
3print(now.year, now.month, now.day, now.hour, now.minute, now.second)