1import datetime
2print(datetime.datetime.now()) #datetime.datetime.now() is the syntax
1>>> import datetime
2>>> d1 = datetime.date.today()
3>>> from dateutil.relativedelta import relativedelta
4>>> d1 + relativedelta(months=1)
5datetime.date(2012, 4, 8)
6
7>>> d2 = datetime.date(year=2012,month=1,day=31)
8>>> d2 + relativedelta(months=1)
9datetime.date(2012, 2, 29)
10