Python establece una fecha y hora específica

Ejemplos de código

20
0

fecha y hora de python

from datetime import datetime
now = datetime.now()
print (now.strftime("%Y-%m-%d %H:%M:%S"))


Output: 2020-06-19 10:34:45
2
0

python establece una fecha y hora específica

from datetime import datetime

custom_date_time = datetime(2021, 7, 23, 17, 30, 29, 431717)
print(custom_date_time)

# Output:
# 2021-07-23 17:30:29.431717

En otros idiomas

Esta página está en otros idiomas

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................