Created
December 20, 2018 00:10
-
-
Save parzibyte/0a22ef94959249d36a92082212616416 to your computer and use it in GitHub Desktop.
Formatear fecha y hora actual en Python-1 created by parzibyte - https://repl.it/@parzibyte/Formatear-fecha-y-hora-actual-en-Python-1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Formatear fecha actual de modo que su formato quede como: | |
"2018-19-12 18:08:50" | |
@author parzibyte | |
""" | |
from datetime import datetime | |
ahora = datetime.now() | |
fecha = ahora.strftime("%Y-%m-%d %H:%M:%S") | |
#Imprimir | |
print(fecha) | |
# 2018-12-20 00:10:34 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment