AttributeError: type object ‘datetime.datetime’ has no attribute ‘datetime’ in Python (2 Examples)

Publicado el: 13 febrero 2023
en el canal de: Statistics Globe
1,888
22

How to deal with the AttributeError: type object ‘datetime.datetime’ has no attribute ‘datetime’ in the Python programming language. More details: https://statisticsglobe.com/type-obje...
This tutorial was created in collaboration with Matthias Bäuerlen: https://statisticsglobe.com/matthias-...
Python code of this video:

from datetime import datetime # Import datetime

x = datetime.datetime(2022, 8, 6) # Creating datetime object does not work
AttributeError: type object 'datetime.datetime' has no attribute 'datetime'

import datetime # Import datetime

x = datetime.datetime(2022, 8, 6) # Creating datetime object works properly
print(x) # Print properly created datetime object
2022-08-06 00:00:00

Follow me on Social Media:
Facebook – Statistics Globe Page:   / statisticsglobecom  
Facebook – R Programming Group for Discussions & Questions:   / statisticsglobe  
Facebook – Python Programming Group for Discussions & Questions:   / statisticsglobepython  
LinkedIn – Statistics Globe Page:   / statisticsglobe  
LinkedIn – R Programming Group for Discussions & Questions:   / 12555223  
LinkedIn – Python Programming Group for Discussions & Questions:   / 12673534  
Twitter:   / joachimschork  

Music by bensound.com


En esta página del sitio puede ver el video en línea AttributeError: type object ‘datetime.datetime’ has no attribute ‘datetime’ in Python (2 Examples) de Duración hora minuto segunda en buena calidad , que subió el usuario Statistics Globe 13 febrero 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,888 veces y le gustó 22 a los espectadores. Disfruta viendo!