Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 20, 2018 03:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/934e0690f4bc6846332fda6d32ff40a3 to your computer and use it in GitHub Desktop.
Save parzibyte/934e0690f4bc6846332fda6d32ff40a3 to your computer and use it in GitHub Desktop.
Hora actual en formato de 12 horas created by parzibyte - https://repl.it/@parzibyte/Hora-actual-en-formato-de-12-horas
"""
Hora actual en formato de 12 horas,
con AM y PM
@author parzibyte
"""
from datetime import datetime
ahora = datetime.now()
fecha = ahora.strftime("%I:%S:%M %p")
#Imprimir
print(fecha)
# 03:31:33 AM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment