python - ImportError: No module named date -
i can import datetime , access datetime.date when try import datetime.date directly import error. why this?
>>> import datetime >>> print datetime.date <type 'datetime.date'> >>> import datetime.date traceback (most recent call last): file "<stdin>", line 1, in <module> importerror: no module named date >>>
https://svn.python.org/projects/sandbox/trunk/datetime/datetime.py
there seems date class in datetime.py , today under that
to make matters more confusing there datetime.date.today , datetime.datetime.now https://www.codecademy.com/en/forum_questions/523fb72b80ff3325c6000732
>>> datetime import date >>> = date.today >>> now().month 8
you can use variable use function directly
Comments
Post a Comment