I\'m teaching myself Python and was just \"exploring\". Google says that datetime is a global variable but when I try to find todays date in the terminal I receive the NameE
You need to import the module datetime first:
>>> import datetime
After that it works:
>>> import datetime
>>> date = datetime.date.today()
>>> date
datetime.date(2013, 11, 12)
It can also be used as below:
from datetime import datetime
start_date = datetime(2016,3,1)
end_date = datetime(2016,3,10)