Python Question

ImportError: No module named date

I can import datetime and access but when I try to import directly I get an import error. Why is this?

>>> import datetime
>>> print
<type ''>
>>> import
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named date

There seems to be a date class in and today under that

To make matters more confusing there is and

Answer Source
>>> from datetime import date
>>> now =
>>> now().month

You can use a variable to use the function directly

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download