[Python] Module 'datetime' has no attribute 'date'

Discussão em 'Python' iniciado por Stack, Outubro 5, 2024.

  1. Stack

    Stack Membro Participativo

    import datetime
    currentDate = datetime.date.today()
    print (currentDate)
    print (currentDate.year)


    this gives an error:

    AttributeError: module 'datetime' has no attribute 'date'


    I am still learning python (1 week old)

    Continue reading...

Compartilhe esta Página