Python stabilește un anumit datetime

Exemple de cod

20
0

python Data și ora

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 stabilește un anumit datetime

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

În alte limbi

Această pagină este în alte limbi

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