The following code prints the current date:

import datetime as dt
now = dt.datetime.now()
print(now.year)
print(now.month)
print(now.day)

First we import datetime library. now() function gets the current date and time from the server. now.year, now.month, and now.day prints current year, month, and day.