Модуль datetime не имеет атрибута date. ⇐ Python

Программы на Python
Anonymous
Модуль datetime не имеет атрибута date.

Сообщение Anonymous »

Код: Выделить всё

import datetime
currentDate = datetime.date.today()
print (currentDate)
print (currentDate.year)
выдает ошибку:

Код: Выделить всё

AttributeError: module 'datetime' has no attribute 'date'
Я все еще изучаю Python (1 неделя)

Подробнее здесь: https://stackoverflow.com/questions/533 ... ibute-date

Вернуться в «Python»