Creating a New Date : datetime « Buildin Module « Python Tutorial






import datetime
print datetime.datetime.today()

d = datetime.datetime(2007,01,01)
print d








14.3.datetime
14.3.1.Creating a New Date
14.3.2.Date Operations
14.3.3.datetime module